Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBufferFull is thrown when the channel buffer is full. ErrBufferFull = errors.New("buffer is full") // ErrCannotPauseDuringActiveTransfer is thrown when the user attempts to pause a runner // during an active transfer. ErrCannotPauseDuringActiveTransfer = errors.New("cannot pause during an active transfer") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Transfer() transfer.Transfer Info() Info Claims() jwt.Claims Heartbeat() Heartbeat Paused() bool ToggleState() (state State, err error) // Consume & Produce Produce(operation *grpc_runner_v1.OperationResponse) (err error) Consume() <-chan *grpc_runner_v1.OperationResponse }
func New ¶
func New(claims *claims.RunnerClaims) Client
type Heartbeat ¶
type Heartbeat interface { Verify(timestamp time.Time) (ok bool) Set(timestamp time.Time) Get() (timestamp time.Time, ok bool) Latency() float64 }
Heartbeat defines the heart beating of a client. When a heartbeat is verified, the latency get's calculated (the time it took to receive and calculate the beat).
type Info ¶
Click to show internal directories.
Click to hide internal directories.