grpc

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 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) GetOutputStream

func (c *GRPCClient) GetOutputStream(ctx context.Context, executionID string, withHistory bool, follow bool) (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
}

func (*GRPCServer) Cancel

func (*GRPCServer) GetOutputStream

func (s *GRPCServer) GetOutputStream(request *proto.OutputStreamRequest, server proto.Executor_GetOutputStreamServer) error

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