v1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoReplyMsgID      = errors.New("no repliesTo set - cannot handle message")
	ErrNoMatchingRequest = errors.New("no matching request for given message id")
)
View Source
var (
	ErrExecutionCompleted = errors.New("execution completed")
)

Functions

func NewExecutorServiceServer

func NewExecutorServiceServer(registry *modules.TypeRegistry) rpcv1connect.ExecutorServiceHandler

func NewHealthServer

func NewHealthServer(logger *slog.Logger) healthv1connect.HealthHandler

Types

type ContainerExecutionContext

type ContainerExecutionContext struct {
	context.Context
	// contains filtered or unexported fields
}

func NewContainerExecutionContext

func NewContainerExecutionContext(
	ctx context.Context,
	logger *slog.Logger,
	name,
	workingDir string,
	sender StreamSender[*remotev1.ExecutionServerMessage],
	remoteState *RemoteStateClient,
) *ContainerExecutionContext

func (ContainerExecutionContext) BinariesDir

func (c ContainerExecutionContext) BinariesDir() string

func (ContainerExecutionContext) GetState

func (ContainerExecutionContext) Logger

func (ContainerExecutionContext) Name

func (ContainerExecutionContext) OutDir

func (c ContainerExecutionContext) OutDir() string

func (ContainerExecutionContext) SetState

func (c ContainerExecutionContext) SetState(ctx context.Context, key string, value []byte) error

func (ContainerExecutionContext) StdErr

func (c ContainerExecutionContext) StdErr() io.Writer

func (ContainerExecutionContext) StdOut

func (c ContainerExecutionContext) StdOut() io.Writer

func (ContainerExecutionContext) WorkingDir

func (c ContainerExecutionContext) WorkingDir() string

type ExecutorServiceServer

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

func (*ExecutorServiceServer) ExecuteStream

type GrpcExecutorHandler

type GrpcExecutorHandler struct {
	Level slog.Level
	// contains filtered or unexported fields
}

func (GrpcExecutorHandler) Enabled

func (g GrpcExecutorHandler) Enabled(_ context.Context, level slog.Level) bool

func (GrpcExecutorHandler) Handle

func (g GrpcExecutorHandler) Handle(_ context.Context, record slog.Record) error

func (GrpcExecutorHandler) WithAttrs

func (g GrpcExecutorHandler) WithAttrs(attrs []slog.Attr) slog.Handler

func (GrpcExecutorHandler) WithGroup

func (g GrpcExecutorHandler) WithGroup(name string) slog.Handler

type PluginManagerServiceServer

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

type RemoteStateClient

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

func (*RemoteStateClient) GetState

func (c *RemoteStateClient) GetState(ctx context.Context, key string) ([]byte, state.Metadata, error)

func (*RemoteStateClient) SetState

func (c *RemoteStateClient) SetState(ctx context.Context, key string, value []byte) error

type RemoteTaskExecutor

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

func (*RemoteTaskExecutor) Execute

func (e *RemoteTaskExecutor) Execute(
	ctx context.Context,
	startTask *remotev1.StartTaskRequest,
) (resp chan *remotev1.TaskResult, errs chan error)

type RequestResponseClient

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

func (*RequestResponseClient) DispatchMessages

func (rrc *RequestResponseClient) DispatchMessages(receiver StreamReceiver[*remotev1.ExecutionClientMessage]) (errs chan error)

func (*RequestResponseClient) Send

type StreamReceiver

type StreamReceiver[T proto.Message] interface {
	Receive() (msg T, err error)
}

type StreamSender

type StreamSender[T proto.Message] interface {
	Send(msg T) error
}

Jump to

Keyboard shortcuts

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