agent

package
v0.0.0-...-37de26c Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

Agent struct todo: agent needs appID

func NewAgent

func NewAgent(opts *Options, ml pb.AgentServer, logger logger.Logger) (*Agent, error)

func NewLocalAgent

func NewLocalAgent(ml pb.AgentServer, logger logger.Logger) (*Agent, error)

func (*Agent) RunJob

func (a *Agent) RunJob(ctx context.Context, executorPath string, appID int) (err error)

RunJob runs the executor in a shell

func (*Agent) SetExecutorLogger

func (a *Agent) SetExecutorLogger(w io.WriteCloser) *Agent

SetExecutorLogger sets executor log writer property

func (*Agent) SetLogger

func (a *Agent) SetLogger(l logger.Logger)

SetLogger set the logger property

func (*Agent) SetMetricLogger

func (a *Agent) SetMetricLogger(ml pb.AgentServer)

SetMetricLogger sets metric logger property

func (*Agent) StartSocketServer

func (a *Agent) StartSocketServer() error

StartSocketServer setup an rpc server over agent unix socket the function runs the server in a separate routine

type Options

type Options struct {
	Route       string
	ClusterPort int
	Socket      string
}

Jump to

Keyboard shortcuts

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