worker

package
v0.0.0-...-f7dd217 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlledWorker

type ControlledWorker struct {
	// contains filtered or unexported fields
}

func NewControlledWorker

func NewControlledWorker(info *pb.WorkerInfo, conn *grpc.ClientConn) *ControlledWorker

func (*ControlledWorker) Client

func (w *ControlledWorker) Client() pb.WorkerClient

func (*ControlledWorker) Close

func (w *ControlledWorker) Close() error

func (*ControlledWorker) GetCurrent

func (w *ControlledWorker) GetCurrent(i uint32) uint32

func (*ControlledWorker) GetStatus

func (w *ControlledWorker) GetStatus() pb.WorkerInfo_Status

func (*ControlledWorker) Info

func (w *ControlledWorker) Info() *pb.WorkerInfo

func (*ControlledWorker) SetCurrent

func (w *ControlledWorker) SetCurrent(i uint32)

func (*ControlledWorker) SetStatus

func (w *ControlledWorker) SetStatus(status pb.WorkerInfo_Status)

type ControlledWorkers

type ControlledWorkers struct {
	// contains filtered or unexported fields
}

func NewControlledWorkers

func NewControlledWorkers() *ControlledWorkers

func (*ControlledWorkers) Delete

func (c *ControlledWorkers) Delete(addr string)

func (*ControlledWorkers) Each

func (c *ControlledWorkers) Each(f func(w *ControlledWorker))

func (*ControlledWorkers) EachWithBool

func (c *ControlledWorkers) EachWithBool(f func(w *ControlledWorker) bool)

func (*ControlledWorkers) EachWithErr

func (c *ControlledWorkers) EachWithErr(f func(w *ControlledWorker) error) error

func (*ControlledWorkers) ExistsRunningWorkers

func (c *ControlledWorkers) ExistsRunningWorkers() bool

func (*ControlledWorkers) GetByAddr

func (c *ControlledWorkers) GetByAddr(addr string) *ControlledWorker

func (*ControlledWorkers) GetByUUID

func (c *ControlledWorkers) GetByUUID(uuid string) *ControlledWorker

func (*ControlledWorkers) Set

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(waitTickerMSec time.Duration) *Service

func (*Service) DisconnectPlugin

func (s *Service) DisconnectPlugin()

func (*Service) Distribute

func (s *Service) Distribute(ctx context.Context, req *pb.DistributeRequest) (*empty.Empty, error)

func (*Service) Execute

func (s *Service) Execute(ctx context.Context, req *pb.ExecuteRequest) (*empty.Empty, error)

func (*Service) Stop

func (s *Service) Stop(ctx context.Context, _ *empty.Empty) (*empty.Empty, error)

func (*Service) Wait

func (s *Service) Wait(_ *empty.Empty, server pb.Worker_WaitServer) error

Jump to

Keyboard shortcuts

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