Documentation ¶
Index ¶
- Constants
- func GetConnectedSites(dd libdocker.Interface) (types.TransportConnectedSites, error)
- func GetRouterConfigForProxy(definition types.ServiceInterface, siteId string) (string, error)
- func GetTransportMode(qdr *dockertypes.ContainerJSON) types.TransportMode
- func IsInterior(qdr *dockertypes.ContainerJSON) bool
- func MarshalRouterConfig(config RouterConfig) (string, error)
- type Address
- type BridgeConfig
- type ConnectedSites
- type Connection
- type Connector
- type Distribution
- type ExecResult
- type HttpEndpoint
- type HttpEndpointMap
- type Listener
- type Mode
- type Role
- type RouterConfig
- func (r *RouterConfig) AddAddress(a Address)
- func (r *RouterConfig) AddConnSslProfile(s SslProfile)
- func (r *RouterConfig) AddConnector(c Connector)
- func (r *RouterConfig) AddHttpConnector(e HttpEndpoint)
- func (r *RouterConfig) AddHttpListener(e HttpEndpoint)
- func (r *RouterConfig) AddListener(l Listener)
- func (r *RouterConfig) AddSslProfile(s SslProfile)
- func (r *RouterConfig) AddTcpConnector(e TcpEndpoint)
- func (r *RouterConfig) AddTcpListener(e TcpEndpoint)
- func (r *RouterConfig) IsEdge() bool
- func (r *RouterConfig) RemoveConnSslProfile(name string) bool
- func (r *RouterConfig) RemoveConnector(name string) bool
- func (r *RouterConfig) UpdateBridgeConfig(desired BridgeConfig) bool
- func (r *RouterConfig) WriteToConfigFile(configFile string) error
- type RouterMetadata
- type RouterNode
- type SslProfile
- type TcpEndpoint
- type TcpEndpointMap
Constants ¶
View Source
const ( DistributionBalanced Distribution = "balanced" DistributionMulticast = "multicast" DistributionClosest = "closest" )
Variables ¶
This section is empty.
Functions ¶
func GetConnectedSites ¶
func GetConnectedSites(dd libdocker.Interface) (types.TransportConnectedSites, error)
func GetRouterConfigForProxy ¶
func GetRouterConfigForProxy(definition types.ServiceInterface, siteId string) (string, error)
func GetTransportMode ¶
func GetTransportMode(qdr *dockertypes.ContainerJSON) types.TransportMode
func IsInterior ¶
func IsInterior(qdr *dockertypes.ContainerJSON) bool
func MarshalRouterConfig ¶
func MarshalRouterConfig(config RouterConfig) (string, error)
Types ¶
type BridgeConfig ¶
type BridgeConfig struct { TcpListeners TcpEndpointMap TcpConnectors TcpEndpointMap HttpListeners HttpEndpointMap HttpConnectors HttpEndpointMap }
func NewBridgeConfig ¶
func NewBridgeConfig() BridgeConfig
func (*BridgeConfig) AddHttpConnector ¶
func (bc *BridgeConfig) AddHttpConnector(e HttpEndpoint)
func (*BridgeConfig) AddHttpListener ¶
func (bc *BridgeConfig) AddHttpListener(e HttpEndpoint)
func (*BridgeConfig) AddTcpConnector ¶
func (bc *BridgeConfig) AddTcpConnector(e TcpEndpoint)
func (*BridgeConfig) AddTcpListener ¶
func (bc *BridgeConfig) AddTcpListener(e TcpEndpoint)
type ConnectedSites ¶
type Connection ¶
type Connection struct { Container string `json:"container"` OperStatus string `json:"operStatus"` Host string `json:"host"` Role string `json:"role"` Active bool `json:"active"` Dir string `json:"dir"` }
func GetConnections ¶
func GetConnections(dd libdocker.Interface) ([]Connection, error)
func GetInterRouterOrEdgeConnection ¶
func GetInterRouterOrEdgeConnection(host string, connections []Connection) *Connection
type Connector ¶
type Connector struct { Name string `json:"name,omitempty"` Role Role `json:"role,omitempty"` Host string `json:"host"` Port string `json:"port"` RouteContainer bool `json:"routeContainer,omitempty"` Cost int32 `json:"cost,omitempty"` VerifyHostname bool `json:"verifyHostname,omitempty"` SslProfile string `json:"sslProfile,omitempty"` LinkCapacity int32 `json:"linkCapacity,omitempty"` }
type Distribution ¶
type Distribution string
type ExecResult ¶
type ExecResult struct { ExitCode int // contains filtered or unexported fields }
func (*ExecResult) Stderr ¶
func (res *ExecResult) Stderr() string
func (*ExecResult) Stdout ¶
func (res *ExecResult) Stdout() string
type HttpEndpoint ¶
type HttpEndpoint struct { Name string `json:"name,omitempty"` Host string `json:"host,omitempty"` Port string `json:"port,omitempty"` Address string `json:"address,omitempty"` SiteId string `json:"siteId,omitempty"` ProtocolVersion string `json:"protocolVersion,omitempty"` Aggregation string `json:"aggregation,omitempty"` EventChannel bool `json:"eventChannel,omitempty"` HostOverride string `json:"hostOverride,omitempty"` }
type HttpEndpointMap ¶
type HttpEndpointMap map[string]HttpEndpoint
type Listener ¶
type Listener struct { Name string `json:"name,omitempty"` Role Role `json:"role,omitempty"` Host string `json:"host,omitempty"` Port int32 `json:"port"` RouteContainer bool `json:"routeContainer,omitempty"` Http bool `json:"http,omitempty"` Cost int32 `json:"cost,omitempty"` SslProfile string `json:"sslProfile,omitempty"` SaslMechanisms string `json:"saslMechanisms,omitempty"` AuthenticatePeer bool `json:"authenticatePeer,omitempty"` LinkCapacity int32 `json:"linkCapacity,omitempty"` HttpRootDir string `json:"httpRootDir,omitempty"` Websockets bool `json:"websockets,omitempty"` Healthz bool `json:"healthz,omitempty"` Metrics bool `json:"metrics,omitempty"` }
type RouterConfig ¶
type RouterConfig struct { Metadata RouterMetadata SslProfiles map[string]SslProfile Listeners map[string]Listener Connectors map[string]Connector Addresses map[string]Address Bridges BridgeConfig }
func GetRouterConfigFromFile ¶
func GetRouterConfigFromFile(name string) (*RouterConfig, error)
func InitialConfig ¶
func InitialConfig(id string, metadata string, edge bool) RouterConfig
func UnmarshalRouterConfig ¶
func UnmarshalRouterConfig(config string) (RouterConfig, error)
func (*RouterConfig) AddAddress ¶
func (r *RouterConfig) AddAddress(a Address)
func (*RouterConfig) AddConnSslProfile ¶
func (r *RouterConfig) AddConnSslProfile(s SslProfile)
func (*RouterConfig) AddConnector ¶
func (r *RouterConfig) AddConnector(c Connector)
func (*RouterConfig) AddHttpConnector ¶
func (r *RouterConfig) AddHttpConnector(e HttpEndpoint)
func (*RouterConfig) AddHttpListener ¶
func (r *RouterConfig) AddHttpListener(e HttpEndpoint)
func (*RouterConfig) AddListener ¶
func (r *RouterConfig) AddListener(l Listener)
func (*RouterConfig) AddSslProfile ¶
func (r *RouterConfig) AddSslProfile(s SslProfile)
func (*RouterConfig) AddTcpConnector ¶
func (r *RouterConfig) AddTcpConnector(e TcpEndpoint)
func (*RouterConfig) AddTcpListener ¶
func (r *RouterConfig) AddTcpListener(e TcpEndpoint)
func (*RouterConfig) IsEdge ¶
func (r *RouterConfig) IsEdge() bool
func (*RouterConfig) RemoveConnSslProfile ¶
func (r *RouterConfig) RemoveConnSslProfile(name string) bool
func (*RouterConfig) RemoveConnector ¶
func (r *RouterConfig) RemoveConnector(name string) bool
func (*RouterConfig) UpdateBridgeConfig ¶
func (r *RouterConfig) UpdateBridgeConfig(desired BridgeConfig) bool
func (*RouterConfig) WriteToConfigFile ¶
func (r *RouterConfig) WriteToConfigFile(configFile string) error
type RouterMetadata ¶
type RouterNode ¶
type SslProfile ¶
type TcpEndpoint ¶
type TcpEndpointMap ¶
type TcpEndpointMap map[string]TcpEndpoint
Click to show internal directories.
Click to hide internal directories.