websocket

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoShuttleConnection = fmt.Errorf("no connection to requested shuttle")

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Handle                string
	Ctx                   context.Context
	Hostname              string
	AddrInfo              peer.AddrInfo
	Address               address.Address
	Private               bool
	ContentAddingDisabled bool
	SpaceLow              bool
	BlockstoreSize        uint64
	BlockstoreFree        uint64
	PinCount              int64
	PinQueueLength        int64
	QueueEngEnabled       bool
	// contains filtered or unexported fields
}

func (*Connection) SendMessage

func (sc *Connection) SendMessage(ctx context.Context, cmd *rpcevent.Command) error

type IEstuaryRpcEngine

type IEstuaryRpcEngine interface {
	Connect(ws *gwebsocket.Conn, handle string, done chan struct{}) (func() error, func(), error)
	GetShuttleConnections() []*Connection
	GetShuttleConnection(handle string) (*Connection, bool)
}

func NewEstuaryRpcEngine

func NewEstuaryRpcEngine(ctx context.Context, db *gorm.DB, cfg *config.Estuary, log *zap.SugaredLogger, handlerFn types.MessageHandlerFn) IEstuaryRpcEngine

Jump to

Keyboard shortcuts

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