Documentation ¶
Overview ¶
Package types contains types that are used by werifyd and its worker pools. It doesn't try to be an elegant solution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host struct { Endpoint wrpc.Endpoint Added time.Time LastHealthCheckAttempt *time.Time IsAlive bool sync.Mutex Conn *rpc.Client }
Host is the main struct for each host, satisfies the PoolData interface
func (*Host) GetOperation ¶
GetOperation satisfies the PoolData interface, returning zero-value
type PoolData ¶
PoolData is used by the worker pool, which can be either an operation pool or an host pool
type WorkerOperation ¶
WorkerOperation is Operation with unique name attached, for the worker pool. Satisfies the PoolData interface.
func (*WorkerOperation) GetHost ¶
func (w *WorkerOperation) GetHost() *Host
GetHost satisfies the PoolData interface, returning the zero-value
func (*WorkerOperation) GetName ¶
func (w *WorkerOperation) GetName() string
GetName satisfies the PoolData interface, returning the name
func (*WorkerOperation) GetOperation ¶
func (w *WorkerOperation) GetOperation() *wrpc.Operation
GetOperation satisfies the PoolData interface, returning the operation