host

package
v1.7.11 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrHostIsClosed = errors.New("server is closed")

ErrHostIsClosed signals that the host was closed while trying to perform actions

View Source
var ErrNilHost = errors.New("nil host provided")

ErrNilHost signals that a nil host has been provided

Functions

func NewHostDriver

func NewHostDriver(args ArgsHostDriver) (*hostDriver, error)

NewHostDriver will create a new instance of hostDriver

Types

type ArgsHostDriver

type ArgsHostDriver struct {
	Marshaller marshal.Marshalizer
	SenderHost SenderHost
	Log        core.Logger
}

ArgsHostDriver holds the arguments needed for creating a new hostDriver

type SenderHost

type SenderHost interface {
	Send(payload []byte, topic string) error
	SetPayloadHandler(handler websocket.PayloadHandler) error
	Close() error
	IsInterfaceNil() bool
}

SenderHost defines the actions that a host sender should do

Jump to

Keyboard shortcuts

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