socket

package
v0.0.0-...-2f48117 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentIdAnnotation = "onspaceship.com/agent-id"
)

Variables

This section is empty.

Functions

func NewSocket

func NewSocket() *socket

func StartListener

func StartListener(ctx context.Context)

Types

type Event

type Event string
const (
	CloseEvent Event = "phx_close"
	ErrorEvent Event = "phx_error"
	JoinEvent  Event = "phx_join"
	ReplyEvent Event = "phx_reply"
	LeaveEvent Event = "phx_leave"
)

type Message

type Message struct {
	Topic   string      `json:"topic"`
	Event   Event       `json:"event"`
	Payload interface{} `json:"payload"`
	Ref     int64       `json:"ref"`
}

type Options

type Options = config.SocketOptions

Jump to

Keyboard shortcuts

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