Documentation ¶
Index ¶
- func DecoderConfig(output interface{}) *mapstructure.DecoderConfig
- func ErrorMessageFromConfigError(err error, configPath string) string
- func GenerateConfig(f string) error
- func GetLogAddresses(addresses []string) string
- func MakeTLSConfig(v ConfigGetter, keyPrefix string) (*tls.Config, error)
- func NodeWithMemoryEngine() *centrifuge.Node
- func NodeWithMemoryEngineNoHandlers() *centrifuge.Node
- func SecureCompare(given, actual []byte) bool
- func SecureCompareString(given, actual string) bool
- func StringToDurationHookFunc() mapstructure.DecodeHookFunc
- func StripPassword(address string) string
- type CommonGRPCProxyTestCase
- type CommonHTTPProxyTestCase
- type ConfigGetter
- type Duration
- type TestClientMock
- type TestTransport
- func (t *TestTransport) AppLevelPing() centrifuge.AppLevelPing
- func (t *TestTransport) Close(disconnect centrifuge.Disconnect) error
- func (t *TestTransport) DisabledPushFlags() uint64
- func (t *TestTransport) Emulation() bool
- func (t *TestTransport) Name() string
- func (t *TestTransport) Protocol() centrifuge.ProtocolType
- func (t *TestTransport) ProtocolVersion() centrifuge.ProtocolVersion
- func (t *TestTransport) Unidirectional() bool
- func (t *TestTransport) Write(message []byte) error
- func (t *TestTransport) WriteMany(messages ...[]byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecoderConfig ¶
func DecoderConfig(output interface{}) *mapstructure.DecoderConfig
DecoderConfig returns default mapstructure.DecoderConfig with support of time.Duration values & string slices & Duration
func ErrorMessageFromConfigError ¶
ErrorMessageFromConfigError tries building a more human-friendly error from a configuration error. At the moment we can additionally extract JSON syntax error line and column. Related issue: https://github.com/golang/go/issues/43513.
func GenerateConfig ¶
GenerateConfig generates configuration file at provided path.
func GetLogAddresses ¶
GetLogAddresses returns a string with addresses (concatenated with comma) with password stripped from each address.
func MakeTLSConfig ¶ added in v4.1.0
func MakeTLSConfig(v ConfigGetter, keyPrefix string) (*tls.Config, error)
func NodeWithMemoryEngine ¶
func NodeWithMemoryEngine() *centrifuge.Node
NodeWithMemoryEngine - builder for centrifuge node with memory engine
func NodeWithMemoryEngineNoHandlers ¶
func NodeWithMemoryEngineNoHandlers() *centrifuge.Node
NodeWithMemoryEngineNoHandlers - builder for centrifuge node with memory engine
func SecureCompare ¶
SecureCompare use constant time function to compare the two given array.
func SecureCompareString ¶
SecureCompareString use constant time function to compare the two given string.
func StringToDurationHookFunc ¶
func StringToDurationHookFunc() mapstructure.DecodeHookFunc
StringToDurationHookFunc returns a DecodeHookFunc that converts strings to time.Duration.
Types ¶
type CommonGRPCProxyTestCase ¶
type CommonGRPCProxyTestCase struct { Node *centrifuge.Node Client *centrifuge.Client ClientCloseFunc centrifuge.ClientCloseFunc Server *grpc.Server Listener *bufconn.Listener }
func NewCommonGRPCProxyTestCase ¶
func NewCommonGRPCProxyTestCase(ctx context.Context, srv proxyproto.CentrifugoProxyServer) *CommonGRPCProxyTestCase
func (*CommonGRPCProxyTestCase) Teardown ¶
func (c *CommonGRPCProxyTestCase) Teardown()
type CommonHTTPProxyTestCase ¶
type CommonHTTPProxyTestCase struct { Node *centrifuge.Node Client *centrifuge.Client ClientCloseFunc centrifuge.ClientCloseFunc Server *httptest.Server Mux *http.ServeMux }
func NewCommonHTTPProxyTestCase ¶
func NewCommonHTTPProxyTestCase(ctx context.Context) *CommonHTTPProxyTestCase
func (*CommonHTTPProxyTestCase) Teardown ¶
func (c *CommonHTTPProxyTestCase) Teardown()
type ConfigGetter ¶ added in v4.1.1
type TestClientMock ¶ added in v4.0.1
type TestClientMock struct { IDFunc func() string UserIDFunc func() string IsSubscribedFunc func(string) bool ContextFunc func() context.Context TransportFunc func() centrifuge.TransportInfo }
func (TestClientMock) Context ¶ added in v4.0.1
func (m TestClientMock) Context() context.Context
func (TestClientMock) ID ¶ added in v4.0.1
func (m TestClientMock) ID() string
func (TestClientMock) IsSubscribed ¶ added in v4.0.1
func (m TestClientMock) IsSubscribed(s string) bool
func (TestClientMock) Transport ¶ added in v4.0.1
func (m TestClientMock) Transport() centrifuge.TransportInfo
func (TestClientMock) UserID ¶ added in v4.0.1
func (m TestClientMock) UserID() string
type TestTransport ¶
type TestTransport struct {
// contains filtered or unexported fields
}
TestTransport - test transport
func NewTestTransport ¶
func NewTestTransport() *TestTransport
NewTestTransport - builder for TestTransport
func (*TestTransport) AppLevelPing ¶
func (t *TestTransport) AppLevelPing() centrifuge.AppLevelPing
AppLevelPing ...
func (*TestTransport) Close ¶
func (t *TestTransport) Close(disconnect centrifuge.Disconnect) error
Close - ...
func (*TestTransport) DisabledPushFlags ¶
func (t *TestTransport) DisabledPushFlags() uint64
DisabledPushFlags - ...
func (*TestTransport) Protocol ¶
func (t *TestTransport) Protocol() centrifuge.ProtocolType
Protocol - ...
func (*TestTransport) ProtocolVersion ¶
func (t *TestTransport) ProtocolVersion() centrifuge.ProtocolVersion
ProtocolVersion returns transport protocol version.
func (*TestTransport) Unidirectional ¶
func (t *TestTransport) Unidirectional() bool
Unidirectional - ...
func (*TestTransport) WriteMany ¶
func (t *TestTransport) WriteMany(messages ...[]byte) error
WriteMany - ...