Versions in this module Expand all Collapse all v1 v1.2.8 Feb 22, 2023 v1.2.6 Feb 22, 2023 v1.2.5 Feb 22, 2023 v1.2.4 Feb 22, 2023 Changes in this version + const DirectionIn + const DirectionOut + const DistributionBalanced + const DistributionClosest + const DistributionMulticast + const HttpVersion1 + const HttpVersion2 + const VersionProperty + func AsConfigMapData(config string) map[string]string + func AsInt(value interface{}) (int, bool) + func AsUint64(value interface{}) (uint64, bool) + func GetRouterConfigForHeadlessProxy(definition types.ServiceInterface, siteId string, version string, ...) (string, error) + func GetSiteNameForGateway(gateway *Router) string + func MarshalRouterConfig(config RouterConfig) (string, error) + func RouterConfigEquals(actual, desired string) bool + type AddedSslProfiles []string + type Address struct + Distribution string + Prefix string + type Agent struct + func Connect(url string, config *tls.Config) (*Agent, error) + func (a *Agent) BatchQuery(queries []Query) ([][]Record, error) + func (a *Agent) Close() error + func (a *Agent) Create(typename string, name string, attributes map[string]interface{}) error + func (a *Agent) CreateSslProfile(profile SslProfile) error + func (a *Agent) Delete(typename string, name string) error + func (a *Agent) GetAllRouters() ([]Router, error) + func (a *Agent) GetBridges(routers []Router) ([]BridgeConfig, error) + func (a *Agent) GetConnections() ([]Connection, error) + func (a *Agent) GetConnectionsFor(agent string) ([]Connection, error) + func (a *Agent) GetConnectorByName(name string) (*Connector, error) + func (a *Agent) GetHttpRequestInfo(routers []Router) ([][]HttpRequestInfo, error) + func (a *Agent) GetInteriorNodes() ([]RouterNode, error) + func (a *Agent) GetLocalBridgeConfig() (*BridgeConfig, error) + func (a *Agent) GetLocalConnectorStatus() (map[string]ConnectorStatus, error) + func (a *Agent) GetLocalConnectors() (map[string]Connector, error) + func (a *Agent) GetLocalGateways() ([]Router, error) + func (a *Agent) GetLocalHttpConnectors(filter HttpEndpointFilter) ([]HttpEndpoint, error) + func (a *Agent) GetLocalHttpListeners(filter HttpEndpointFilter) ([]HttpEndpoint, error) + func (a *Agent) GetLocalHttpRequestInfo() ([]HttpRequestInfo, error) + func (a *Agent) GetLocalRouter() (*Router, error) + func (a *Agent) GetLocalTcpConnections() ([]TcpConnection, error) + func (a *Agent) GetLocalTcpConnectors(filter TcpEndpointFilter) ([]TcpEndpoint, error) + func (a *Agent) GetLocalTcpListeners(filter TcpEndpointFilter) ([]TcpEndpoint, error) + func (a *Agent) GetSslProfileByName(name string) (*SslProfile, error) + func (a *Agent) GetTcpConnections(routers []Router) ([][]TcpConnection, error) + func (a *Agent) Query(typename string, attributes []string) ([]Record, error) + func (a *Agent) QueryByAgentAddress(typename string, attributes []string, agent string) ([]Record, error) + func (a *Agent) QueryRouterNode(typename string, attributes []string, node *RouterNode) ([]Record, error) + func (a *Agent) Request(request *Request) (*Response, error) + func (a *Agent) UpdateConnectorConfig(changes *ConnectorDifference) error + func (a *Agent) UpdateLocalBridgeConfig(changes *BridgeConfigDifference) error + type AgentPool struct + func NewAgentPool(url string, config *tls.Config) *AgentPool + func (p *AgentPool) Get() (*Agent, error) + func (p *AgentPool) Put(a *Agent) + type AmqpConnection struct + func (c *AmqpConnection) Close() + func (c *AmqpConnection) Receiver(address string, credit uint32) (messaging.Receiver, error) + func (c *AmqpConnection) Sender(address string) (messaging.Sender, error) + type AmqpReceiver struct + func (s *AmqpReceiver) Accept(msg *amqp.Message) error + func (s *AmqpReceiver) Close() error + func (s *AmqpReceiver) Receive() (*amqp.Message, error) + type AmqpSender struct + func (s *AmqpSender) Close() error + func (s *AmqpSender) Send(msg *amqp.Message) error + type BridgeConfig struct + HttpConnectors HttpEndpointMap + HttpListeners HttpEndpointMap + TcpConnectors TcpEndpointMap + TcpListeners TcpEndpointMap + func GetBridgeConfigFromConfigMap(configmap *corev1.ConfigMap) (*BridgeConfig, error) + func NewBridgeConfig() BridgeConfig + func NewBridgeConfigCopy(src BridgeConfig) BridgeConfig + func (a *BridgeConfig) Difference(b *BridgeConfig) *BridgeConfigDifference + func (b *BridgeConfig) UpdateConfigMap(configmap *corev1.ConfigMap) (bool, error) + func (bc *BridgeConfig) AddHttpConnector(e HttpEndpoint) + func (bc *BridgeConfig) AddHttpListener(e HttpEndpoint) + func (bc *BridgeConfig) AddTcpConnector(e TcpEndpoint) + func (bc *BridgeConfig) AddTcpListener(e TcpEndpoint) + func (bc *BridgeConfig) RemoveHttpConnector(name string) (bool, HttpEndpoint) + func (bc *BridgeConfig) RemoveHttpListener(name string) (bool, HttpEndpoint) + func (bc *BridgeConfig) RemoveTcpConnector(name string) (bool, TcpEndpoint) + func (bc *BridgeConfig) RemoveTcpListener(name string) (bool, TcpEndpoint) + type BridgeConfigDifference struct + AddedSslProfiles []string + DeletedSSlProfiles []string + HttpConnectors HttpEndpointDifference + HttpListeners HttpEndpointDifference + TcpConnectors TcpEndpointDifference + TcpListeners TcpEndpointDifference + func (a *BridgeConfigDifference) Empty() bool + func (a *BridgeConfigDifference) Print() + type Connection struct + Active bool + Container string + Dir string + Host string + OperStatus string + Role string + type ConnectionFactory struct + func NewConnectionFactory(url string, config *tls.Config) *ConnectionFactory + func (f *ConnectionFactory) Connect() (messaging.Connection, error) + func (f *ConnectionFactory) Url() string + type Connector struct + Cost int32 + Host string + LinkCapacity int32 + MaxFrameSize int + MaxSessionFrames int + Name string + Port string + Role Role + RouteContainer bool + SslProfile string + VerifyHostname bool + func (c *Connector) SetMaxFrameSize(value int) + func (c *Connector) SetMaxSessionFrames(value int) + type ConnectorDifference struct + Added []Connector + AddedSslProfiles map[string]SslProfile + Deleted []Connector + func ConnectorsDifference(actual map[string]Connector, desired *RouterConfig, ignorePrefix *string) *ConnectorDifference + func (a *ConnectorDifference) Empty() bool + type ConnectorStatus struct + Cost int + Description string + Host string + Name string + Port string + Role string + Status string + type DeletedSslProfiles []string + type Distribution string + type HttpEndpoint struct + Address string + Aggregation string + EventChannel bool + Host string + HostOverride string + Name string + Port string + ProtocolVersion string + SiteId string + SslProfile string + VerifyHostname *bool + func GetHttpConnectors(bridges []BridgeConfig) []HttpEndpoint + func GetHttpListeners(bridges []BridgeConfig) []HttpEndpoint + func (a HttpEndpoint) Equivalent(b HttpEndpoint) bool + type HttpEndpointDifference struct + Added []HttpEndpoint + Deleted []HttpEndpoint + func (a *HttpEndpointDifference) Empty() bool + type HttpEndpointFilter func(*HttpEndpoint) bool + type HttpEndpointMap map[string]HttpEndpoint + func (a HttpEndpointMap) Difference(b HttpEndpointMap) HttpEndpointDifference + type HttpRequestInfo struct + Address string + BytesIn int + BytesOut int + Details map[string]int + Direction string + Host string + MaxLatency int + Name string + Requests int + Site string + type Listener struct + AuthenticatePeer bool + Cost int32 + Healthz bool + Host string + Http bool + HttpRootDir string + LinkCapacity int32 + MaxFrameSize int + MaxSessionFrames int + Metrics bool + Name string + Port int32 + Role Role + RouteContainer bool + SaslMechanisms string + SslProfile string + Websockets bool + func (l *Listener) SetMaxFrameSize(value int) + func (l *Listener) SetMaxSessionFrames(value int) + type LogConfig struct + Enable string + Module string + type Mode string + const ModeEdge + const ModeInterior + type Query struct + type Record map[string]interface + func (r Record) AsBool(field string) bool + func (r Record) AsInt(field string) int + func (r Record) AsRecord(field string) Record + func (r Record) AsString(field string) string + func (r Record) AsUint64(field string) uint64 + type Request struct + Address string + Body string + Properties map[string]interface{} + Type string + Version string + type RequestResponse interface + Request func(request *Request) (*Response, error) + type RequestServer struct + func NewRequestServer(address string, handler RequestResponse, pool *AgentPool) *RequestServer + func (s *RequestServer) Run(ctx context.Context) error + type Response struct + Body string + Properties map[string]interface{} + Type string + Version string + type Role string + const RoleEdge + const RoleInterRouter + type Router struct + Address string + ConnectedTo []string + Edge bool + Id string + Site SiteMetadata + Version string + func GetRoutersForSite(routers []Router, siteId string) []Router + func (r *Router) IsGateway() bool + type RouterConfig struct + Addresses map[string]Address + Bridges BridgeConfig + Connectors map[string]Connector + Listeners map[string]Listener + LogConfig map[string]LogConfig + Metadata RouterMetadata + SslProfiles map[string]SslProfile + func GetRouterConfigFromConfigMap(configmap *corev1.ConfigMap) (*RouterConfig, error) + func InitialConfig(id string, siteId string, version string, edge bool, helloAge int) RouterConfig + func UnmarshalRouterConfig(config string) (RouterConfig, error) + func (r *RouterConfig) AddAddress(a Address) + 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) AddSimpleSslProfile(s SslProfile) + func (r *RouterConfig) AddSimpleSslProfileWithPath(path string, s SslProfile) + func (r *RouterConfig) AddSslProfile(s SslProfile) + func (r *RouterConfig) AddSslProfileWithPath(path string, s SslProfile) + func (r *RouterConfig) AddTcpConnector(e TcpEndpoint) + func (r *RouterConfig) AddTcpListener(e TcpEndpoint) + func (r *RouterConfig) AsConfigMapData() (map[string]string, error) + func (r *RouterConfig) GetSiteMetadata() SiteMetadata + func (r *RouterConfig) IsEdge() bool + func (r *RouterConfig) RemoveConnector(name string) (bool, Connector) + func (r *RouterConfig) RemoveHttpConnector(name string) (bool, HttpEndpoint) + func (r *RouterConfig) RemoveHttpListener(name string) (bool, HttpEndpoint) + func (r *RouterConfig) RemoveSslProfile(name string) bool + func (r *RouterConfig) RemoveTcpConnector(name string) (bool, TcpEndpoint) + func (r *RouterConfig) RemoveTcpListener(name string) (bool, TcpEndpoint) + func (r *RouterConfig) SetLogLevel(module string, level string) bool + func (r *RouterConfig) SetLogLevels(levels map[string]string) bool + func (r *RouterConfig) SetSiteMetadata(site *SiteMetadata) + func (r *RouterConfig) UpdateBridgeConfig(desired BridgeConfig) bool + func (r *RouterConfig) UpdateConfigMap(configmap *corev1.ConfigMap) (bool, error) + func (r *RouterConfig) WriteToConfigMap(configmap *corev1.ConfigMap) error + type RouterMetadata struct + HelloMaxAgeSeconds string + Id string + Metadata string + Mode Mode + type RouterNode struct + Address string + Id string + Name string + NextHop string + type SiteMetadata struct + Id string + Version string + type SslProfile struct + CaCertFile string + CertFile string + Name string + PrivateKeyFile string + type TcpConnection struct + Address string + BytesIn int + BytesOut int + Direction string + Host string + LastIn uint64 + LastOut uint64 + Name string + Uptime uint64 + type TcpEndpoint struct + Address string + Host string + Name string + Port string + SiteId string + SslProfile string + VerifyHostname *bool + func GetTcpConnectors(bridges []BridgeConfig) []TcpEndpoint + func (a TcpEndpoint) Equivalent(b TcpEndpoint) bool + type TcpEndpointDifference struct + Added []TcpEndpoint + Deleted []string + func (a *TcpEndpointDifference) Empty() bool + type TcpEndpointFilter func(*TcpEndpoint) bool + type TcpEndpointMap map[string]TcpEndpoint + func (a TcpEndpointMap) Difference(b TcpEndpointMap) TcpEndpointDifference