tools

package
v3.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

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 GenerateConfig

func GenerateConfig(f string) error

GenerateConfig generates configuration file at provided path.

func GetLogAddresses

func GetLogAddresses(addresses []string) string

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 StringToDurationHookFunc

func StringToDurationHookFunc() mapstructure.DecodeHookFunc

StringToTimeDurationHookFunc returns a DecodeHookFunc that converts strings to time.Duration.

func StripPassword

func StripPassword(address string) string

Types

type CommonGRPCProxyTestCase added in v3.0.1

type CommonGRPCProxyTestCase struct {
	Node            *centrifuge.Node
	Client          *centrifuge.Client
	ClientCloseFunc centrifuge.ClientCloseFunc
	Server          *grpc.Server
	Listener        *bufconn.Listener
}

func NewCommonGRPCProxyTestCase added in v3.0.1

func NewCommonGRPCProxyTestCase(ctx context.Context, srv proxyproto.CentrifugoProxyServer) *CommonGRPCProxyTestCase

func (*CommonGRPCProxyTestCase) Teardown added in v3.0.1

func (c *CommonGRPCProxyTestCase) Teardown()

type CommonHTTPProxyTestCase added in v3.0.1

type CommonHTTPProxyTestCase struct {
	Node            *centrifuge.Node
	Client          *centrifuge.Client
	ClientCloseFunc centrifuge.ClientCloseFunc
	Server          *httptest.Server
	Mux             *http.ServeMux
}

func NewCommonHTTPProxyTestCase added in v3.0.1

func NewCommonHTTPProxyTestCase(ctx context.Context) *CommonHTTPProxyTestCase

func (*CommonHTTPProxyTestCase) Teardown added in v3.0.1

func (c *CommonHTTPProxyTestCase) Teardown()

type Duration

type Duration time.Duration

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

type TestTransport

type TestTransport struct {
	// contains filtered or unexported fields
}

TestTransport - test transport

func NewTestTransport

func NewTestTransport() *TestTransport

NewTestTransport - builder for TestTransport

func (*TestTransport) Close

func (t *TestTransport) Close(disconnect *centrifuge.Disconnect) error

Close - ...

func (*TestTransport) DisabledPushFlags

func (t *TestTransport) DisabledPushFlags() uint64

DisabledPushFlags - ...

func (*TestTransport) Name

func (t *TestTransport) Name() string

Name - ...

func (*TestTransport) Protocol

func (t *TestTransport) Protocol() centrifuge.ProtocolType

Protocol - ...

func (*TestTransport) Unidirectional

func (t *TestTransport) Unidirectional() bool

Unidirectional - ...

func (*TestTransport) Write

func (t *TestTransport) Write(message []byte) error

Write - ...

func (*TestTransport) WriteMany

func (t *TestTransport) WriteMany(messages ...[]byte) error

WriteMany - ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL