Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Name = "api" Address = ":8080" Handler = "meta" Resolver = "micro" APIPath = "/" ProxyPath = "/{service:[a-zA-Z0-9]+}" Namespace = "" ACMEProvider = "autocert" ACMEChallengeProvider = "cloudflare" ACMECA = acme.LetsEncryptProductionCA )
View Source
var ( Flags = []cli.Flag{ &cli.StringFlag{ Name: "address", Usage: "Set the api address e.g 0.0.0.0:8080", EnvVars: []string{"MICRO_API_ADDRESS"}, }, &cli.StringFlag{ Name: "handler", Usage: "Specify the request handler to be used for mapping HTTP requests to services; {api, event, http, rpc}", EnvVars: []string{"MICRO_API_HANDLER"}, }, &cli.StringFlag{ Name: "namespace", Usage: "Set the namespace used by the API e.g. com.example", EnvVars: []string{"MICRO_API_NAMESPACE"}, }, &cli.StringFlag{ Name: "resolver", Usage: "Set the hostname resolver used by the API {host, path, grpc}", EnvVars: []string{"MICRO_API_RESOLVER"}, }, &cli.BoolFlag{ Name: "enable_cors", Usage: "Enable CORS, allowing the API to be called by frontend applications", EnvVars: []string{"MICRO_API_ENABLE_CORS"}, Value: true, }, &cli.BoolFlag{ Name: "enable_acme", Usage: "Enables ACME support via Let's Encrypt. ACME hosts should also be specified.", EnvVars: []string{"MICRO_API_ENABLE_ACME"}, }, &cli.StringFlag{ Name: "acme_hosts", Usage: "Comma separated list of hostnames to manage ACME certs for", EnvVars: []string{"MICRO_API_ACME_HOSTS"}, }, &cli.StringFlag{ Name: "acme_provider", Usage: "The provider that will be used to communicate with Let's Encrypt. Valid options: autocert, certmagic", EnvVars: []string{"MICRO_API_ACME_PROVIDER"}, }, &cli.BoolFlag{ Name: "enable_tls", Usage: "Enable TLS support. Expects cert and key file to be specified", EnvVars: []string{"MICRO_API_ENABLE_TLS"}, }, &cli.StringFlag{ Name: "tls_cert_file", Usage: "Path to the TLS Certificate file", EnvVars: []string{"MICRO_API_TLS_CERT_FILE"}, }, &cli.StringFlag{ Name: "tls_key_file", Usage: "Path to the TLS Key file", EnvVars: []string{"MICRO_API_TLS_KEY_FILE"}, }, &cli.StringFlag{ Name: "tls_client_ca_file", Usage: "Path to the TLS CA file to verify clients against", EnvVars: []string{"MICRO_API_TLS_CLIENT_CA_FILE"}, }, } )
Functions ¶
func NewResolver ¶
NewResolver creates a new micro resolver
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.