Documentation
¶
Index ¶
- func Exists(name string) bool
- func GetPageItems[T any](items []T, max, page int) []T
- func In[T comparable](items []T, item T) bool
- func Index[T comparable](items []T, item T) int
- func RandBytes(n int) []byte
- func RandString(n int) string
- func ReadYaml(file string, module any) error
- func WriteYaml(file string, module any) error
- type UpgraderConf
- type WebSocket
- type WebSocketConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPageItems ¶
func In ¶
func In[T comparable](items []T, item T) bool
func Index ¶
func Index[T comparable](items []T, item T) int
func RandString ¶
Types ¶
type UpgraderConf ¶
func WithSubprotocols ¶
func WithSubprotocols(Subprotocols []string) UpgraderConf
type WebSocket ¶
func DefaultWebSocket ¶
func DefaultWebSocket() *WebSocket
func NewWebSocketServer ¶
func NewWebSocketServer(conf ...WebSocketConfig) *WebSocket
func (*WebSocket) NewWebSocketClient ¶
type WebSocketConfig ¶
type WebSocketConfig func(*WebSocket)
func WithHeartbeatInterval ¶
func WithHeartbeatInterval(d time.Duration) WebSocketConfig
Click to show internal directories.
Click to hide internal directories.