This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from jcooklin/fb/adds-standalone-support
Adds standalone and diagnostic modes
- Loading branch information
Showing
17 changed files
with
1,165 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,5 @@ import: | |
- naming | ||
- peer | ||
- transport | ||
- package: github.com/Sirupsen/logrus | ||
version: ^0.11.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package plugin | ||
|
||
import ( | ||
"fmt" | ||
"path/filepath" | ||
|
||
"github.com/urfave/cli" | ||
) | ||
|
||
var ( | ||
flConfig = cli.StringFlag{ | ||
Name: "config", | ||
Usage: "config to use in JSON format", | ||
} | ||
// If no port was provided we let the OS select a port for us. | ||
// This is safe as address is returned in the Response and keep | ||
// alive prevents unattended plugins. | ||
flPort = cli.StringFlag{ | ||
Name: "port", | ||
Usage: "port GRPC will listen on", | ||
} | ||
flLogLevel = cli.IntFlag{ | ||
Name: "log-level", | ||
Usage: "log level - 0:panic 1:fatal 2:error 3:warn 4:info 5:debug", | ||
Value: 2, | ||
} | ||
flPprof = cli.BoolFlag{ | ||
Name: "pprof", | ||
Usage: "enable pprof", | ||
} | ||
flTLS = cli.BoolFlag{ | ||
Name: "tls", | ||
Usage: "enable TLS", | ||
} | ||
flCertPath = cli.StringFlag{ | ||
Name: "cert-path", | ||
Usage: "necessary to provide when TLS enabled", | ||
} | ||
flKeyPath = cli.StringFlag{ | ||
Name: "key-path", | ||
Usage: "necessary to provide when TLS enabled", | ||
} | ||
flRootCertPaths = cli.StringFlag{ | ||
Name: "root-cert-paths", | ||
Usage: fmt.Sprintf("root paths separated by '%c'", filepath.ListSeparator), | ||
} | ||
flStandAlone = cli.BoolFlag{ | ||
Name: "stand-alone", | ||
Usage: "enable stand alone plugin", | ||
} | ||
flHTTPPort = cli.IntFlag{ | ||
Name: "stand-alone-port", | ||
Usage: "specify http port when stand-alone is set", | ||
Value: 8181, | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.