Documentation ¶
Index ¶
- type Option
- func Cache(c cache.Service) Option
- func CheckOrigin(f func(r *http.Request) bool) Option
- func EnableCompression(b bool) Option
- func GQLSubscription(s gws.Service) Option
- func HandshakeTimeout(d time.Duration) Option
- func ID(s string) Option
- func Message(m message.Service) Option
- func ReadBufferSize(i int) Option
- func Router(r router.Service) Option
- func Sync(s sync.Service) Option
- func WriteBufferSize(i int) Option
- type Options
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
Option func
func CheckOrigin ¶
CheckOrigin to set origin checking function
func EnableCompression ¶
EnableCompression to set compression settings for websocket
func GQLSubscription ¶
GQLSubscription to bind graphql subscription interface to websocket server
func HandshakeTimeout ¶
HandshakeTimeout to set server handshake timeout
func ReadBufferSize ¶
ReadBufferSize to set server read buffer size
func WriteBufferSize ¶
WriteBufferSize to set server write buffer size
type Options ¶
type Options struct { // engine server unique id ID string // HandshakeTimeout specifies the duration for the handshake to complete. HandshakeTimeout time.Duration // ReadBufferSize and WriteBufferSize specify I/O buffer sizes. If a buffer // size is zero, then a default value of 4096 is used. The I/O buffer sizes // do not limit the size of the messages that can be sent or received. ReadBufferSize, WriteBufferSize int // CheckOrigin returns true if the request Origin header is acceptable. If // CheckOrigin is nil, the host in the Origin header must not be set or // must match the host of the request. CheckOrigin func(r *http.Request) bool // EnableCompression specify if the server should attempt to negotiate per // message compression (RFC 7692). Setting this value to true does not // guarantee that compression will be supported. Currently only "no context // takeover" modes are supported. EnableCompression bool // Sync engine server Sync sync.Service // GraphQL subscription server GQLSubscription gws.Service // Cache server Cache cache.Service // Message broker Message message.Service // Router Router router.Service }
Options is the engine server options
Click to show internal directories.
Click to hide internal directories.