Documentation
¶
Index ¶
Constants ¶
View Source
const (
DiscoveryPath = "/docker/ambd/nodes"
)
Variables ¶
View Source
var ( ErrProxyExist = errors.New("proxy exist") ErrMissingName = errors.New("proxy name empty") Targets []string Cancel ctx.CancelFunc RootContext ctx.Context Store *libkv.Store )
View Source
var ( ProxyConfigKey string = "__nobody__" ConfigReset ctx.CancelFunc )
View Source
var ( EnableDiscoveryProxy bool DiscoveryProxyInfo = &Info{ Name: "discovery", Net: "tcp4", From: ":2379", } )
Functions ¶
func DiscoveryURI ¶
func DiscoveryURI()
Types ¶
type Info ¶
type Info struct {
// describe what TLS role this instnace is running
// Either *leave empty*, which is not engage in TLS
// or *client*, which is to connect with provided certificate
// or *server*, which is to listen with provided certificate
ServerRole string `json:"tlsrole"`
// certificate root path
CA string `json:"tlscacert"`
// certificate public private key pair
Cert string `json:"tlscert"`
Key string `json:"tlskey"`
Name string `json:"name"`
Net string `json:"net"`
From string `json:"src"`
FromRange []string `json:"range"`
// static assignment
To []string `json:"dst,omitempty"`
// read from discovery
Service string `json:"srv,omitempty"`
// Abort proxy handler
Cancel ctx.CancelFunc `json:"-"`
}
Click to show internal directories.
Click to hide internal directories.