Documentation
¶
Index ¶
- type WSClient
- type WSClientOption
- type WorkerClient
- func (w *WorkerClient) GetStartedAt() time.Time
- func (w *WorkerClient) GetStatus() string
- func (w *WorkerClient) GetWorkerID() uint
- func (w *WorkerClient) Run(ctx context.Context, req *agent.RequestContext) (*agent.RunResult, error)
- func (w *WorkerClient) Shutdown(ctx context.Context) error
- func (w *WorkerClient) Start(ctx context.Context) error
- type WorkerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WSClient ¶
type WSClient struct {
// contains filtered or unexported fields
}
func NewWSClient ¶
func NewWSClient(serverAddr string, workerID uint, opts ...WSClientOption) *WSClient
func (*WSClient) IsConnected ¶
type WSClientOption ¶
type WSClientOption func(*WSClient)
func WithWorkerID ¶
func WithWorkerID(workerID uint) WSClientOption
type WorkerClient ¶
type WorkerClient struct {
// contains filtered or unexported fields
}
func NewWorker ¶
func NewWorker(ctx context.Context, cfg *WorkerConfig) (*WorkerClient, error)
func (*WorkerClient) GetStartedAt ¶
func (w *WorkerClient) GetStartedAt() time.Time
func (*WorkerClient) GetStatus ¶
func (w *WorkerClient) GetStatus() string
func (*WorkerClient) GetWorkerID ¶
func (w *WorkerClient) GetWorkerID() uint
func (*WorkerClient) Run ¶
func (w *WorkerClient) Run(ctx context.Context, req *agent.RequestContext) (*agent.RunResult, error)
Click to show internal directories.
Click to hide internal directories.