options

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressFetcher

type AddressFetcher func() (string, error)

type ClientOptions

type ClientOptions struct {
	// common
	WorkId                 uint16
	AddressFetcher         AddressFetcher
	PacketSendChanLimit    uint32
	PacketReceiveChanLimit uint32
	MessageTimeout         time.Duration
	Codec                  codec.Codec
	Protocol               protocol.Protocol
	Logger                 logger.Logger

	// only for client
	HeartbeatInterval time.Duration
	ReconnectInterval time.Duration
	ReconnectLimit    uint32
	Reconnect         bool
}

func DefaultClientOptions

func DefaultClientOptions() *ClientOptions

type ServerOptions

type ServerOptions struct {
	// common
	WorkId                 uint16
	Address                string
	PacketSendChanLimit    uint32
	PacketReceiveChanLimit uint32
	MessageTimeout         time.Duration
	Codec                  codec.Codec
	Protocol               protocol.Protocol
	Logger                 logger.Logger

	// only for server
	HeartbeatTimeout time.Duration
}

func DefaultServerOptions

func DefaultServerOptions() *ServerOptions

Jump to

Keyboard shortcuts

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