Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lyind committed Mar 14, 2017
1 parent 7c5482b commit c476925
Show file tree
Hide file tree
Showing 22 changed files with 670 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,50 @@ gradle-app.setting

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
build/**
*.db

# User-specific stuff:
.idea/**/dbnavigator.xml
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries

# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle:
.idea/**/gradle.xml
.idea/**/libraries

# Mongo Explorer plugin:
.idea/**/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "modules/base"]
path = modules/base
url = https://github.com/lyind/base.git
9 changes: 9 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 78 additions & 0 deletions .idea/gradle_extensions.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 60 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/modules/viceroy.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/modules/viceroy_main.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/modules/viceroy_test.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Viceroy

Simple proxy server based on Undertow exporting services discovered via Insect discovery protocol.


## Usage

Configure path prefix to route (PREFIX=ROUTE) mappings via command line options:
```
--viceroy.map /app/help=help-service
--viceroy.map /item=item
```

Requests to the path ```/app/help/item3``` would be proxied to the service ```help-service``` and path ```/item3```.
40 changes: 40 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
plugins {
id 'application'
id 'idea'
id 'java'
id 'com.github.johnrengelman.shadow' version '1.2.4'
}

group 'net.talpidae'
version '1'

defaultTasks 'jar'

sourceCompatibility = 1.8
targetCompatibility = 1.8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

mainClassName = 'net.talpidae.viceroy.ViceroyApplication'
manifest {
attributes 'Main-Class': mainClassName
}

repositories {
mavenLocal()
jcenter()
mavenCentral()
}

// exclude javax.xml.parsers
task printClasspath {
doLast {
configurations.testRuntime.each { println it }
}
}

dependencies {
compileOnly "org.projectlombok:lombok:1.16.14"

compile 'net.talpidae:base:1' // or modules/base
testCompile group: 'junit', name: 'junit', version: '4.11'
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Sun Feb 12 19:24:37 CET 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-all.zip
4 changes: 4 additions & 0 deletions modules/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Place modules here.

If the module sources are not present gradle will look for the artifact elsewhere.

9 changes: 9 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
rootProject.name = 'viceroy'

// module projects (delete their local directories to pull from binary dao instead)
file('modules').listFiles().each { File moduleBuild ->
if (moduleBuild.isDirectory())
{
includeBuild moduleBuild
}
}
Loading

0 comments on commit c476925

Please sign in to comment.