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 ¶
type ReconnectPolicy ¶
type Server ¶
type Server interface {
Publish(topic string, event []byte)
SetAuthenticator(authenticator auth.Authenticator)
SetAuthenticatorFunc(authenticatorFunc auth.AuthenticatorFunc)
SetAuthorizer(authorizer auth.Authorizer)
SetAuthorizerFunc(authorizer auth.AuthorizerFunc)
MetricHandler() http.Handler
}
type ServerConfig ¶
type ServerConfig struct {
Metric *MetricConfig
TLSConfig *tls.Config
Worker *WorkerConfig
}
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
multiple-generators/client
command
|
|
|
multiple-generators/server
command
|
|
|
simple/client
command
|
|
|
simple/server
command
|
|
|
topic-pattern/client
command
|
|
|
topic-pattern/server
command
|
|
Click to show internal directories.
Click to hide internal directories.