host

package
v1.7.13-patch2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: GPL-3.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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