Documentation ¶
Index ¶
Constants ¶
View Source
const ( CodeNotAuthorized = iota + 1 CodeTopicNotAvailable CodeFailedToCreateStream CodeFailedToSendOffer CodeUnknown )
error codes.
View Source
const ( DefCleaningInterval = 10 * time.Second DefClientAcceptorCount = 1 DefClientAcceptorQueueSize = 1 DefEventDistributorCount = 1 DefEVentDistributorQueueSize = 10 )
Variables ¶
This section is empty.
Functions ¶
func GetDefaultTLSConfig ¶
GetDefaultTLSConfig returns a tls.Config with the default settings for server.
func GetSimpleTLS ¶
GetSimpleTLS returns a tls.Config with the default settings for client.
Types ¶
type Client ¶
type ClientConfig ¶
type ClientConfig struct { Token string TLSConfig *tls.Config ReconnectPolicy *ReconnectPolicy }
type MetricConfig ¶ added in v1.1.7
type ReconnectPolicy ¶
type Server ¶
type Server interface { Publish(topic string, event []byte) SetAuthenticator(auth.Authenticator) SetAuthenticatorFunc(auth.AuthenticatorFunc) SetAuthorizer(auth.Authorizer) SetAuthorizerFunc(auth.AuthorizerFunc) MetricHandler() http.Handler }
type ServerConfig ¶ added in v1.1.7
type ServerConfig struct { Metric *MetricConfig TLSConfig *tls.Config Worker *WorkerConfig }
Click to show internal directories.
Click to hide internal directories.