grpc

package
v1.2.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultStreamBufferSize = 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutorGRPCPlugin

type ExecutorGRPCPlugin struct {
	plugin.Plugin
	Impl executor.Executor
}

func (*ExecutorGRPCPlugin) GRPCClient

func (p *ExecutorGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*ExecutorGRPCPlugin) GRPCServer

func (p *ExecutorGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

type GRPCClient

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

func (*GRPCClient) Cancel

func (c *GRPCClient) Cancel(ctx context.Context, id string) error

func (*GRPCClient) GetLogStream added in v1.2.2

func (c *GRPCClient) GetLogStream(ctx context.Context, request executor.LogStreamRequest) (io.ReadCloser, error)

func (*GRPCClient) IsInstalled

func (c *GRPCClient) IsInstalled(ctx context.Context) (bool, error)

func (*GRPCClient) Run

func (*GRPCClient) ShouldBid

func (*GRPCClient) ShouldBidBasedOnUsage

func (*GRPCClient) Start

func (c *GRPCClient) Start(ctx context.Context, request *executor.RunCommandRequest) error

func (*GRPCClient) Wait

func (c *GRPCClient) Wait(ctx context.Context, executionID string) (<-chan *models.RunCommandResult, <-chan error)

type GRPCServer

type GRPCServer struct {
	Impl executor.Executor

	proto.UnimplementedExecutorServer
}

func (*GRPCServer) Cancel

func (*GRPCServer) GetLogStream added in v1.2.2

func (*GRPCServer) IsInstalled

func (*GRPCServer) Run

func (*GRPCServer) ShouldBid

func (s *GRPCServer) ShouldBid(ctx context.Context, request *proto.ShouldBidRequest) (*proto.ShouldBidResponse, error)

func (*GRPCServer) ShouldBidBasedOnUsage

func (s *GRPCServer) ShouldBidBasedOnUsage(
	ctx context.Context,
	request *proto.ShouldBidBasedOnUsageRequest) (*proto.ShouldBidResponse, error)

func (*GRPCServer) Start

func (*GRPCServer) Wait

func (s *GRPCServer) Wait(request *proto.WaitRequest, server proto.Executor_WaitServer) error

type StreamReader

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

func (*StreamReader) Close

func (sr *StreamReader) Close() error

func (*StreamReader) Read

func (sr *StreamReader) Read(p []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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