Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
func DefaultConfig ¶
func DefaultConfig() *Config
type EventHandlerFunc ¶
type EventHandlerFunc func(gatewayEventType pandemonium.OpcodeType, event any)
type Gateway ¶
type Gateway interface {
Connect(ctx context.Context) error
Close(ctx context.Context)
CloseWithCode(ctx context.Context, code int, message string)
Send(ctx context.Context, op pandemonium.OpcodeType, data any) error
Latency() time.Duration
}
Gateway connects to the Eludris websocket gateway (pandemonium).
func New ¶
func New(eventHandlerFunc EventHandlerFunc, opts ...ConfigOpt) Gateway
type Payload ¶
type Payload struct {
Op pandemonium.OpcodeType `json:"op"`
D any `json:"d,omitempty"`
}
func (*Payload) UnmarshalJSON ¶
type PayloadDataUnknown ¶
type PayloadDataUnknown json.RawMessage
Click to show internal directories.
Click to hide internal directories.