client

package
v0.0.0-...-c00f92a Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {

	// Ensemble interactions
	RequestStatus(ctx context.Context, in *pb.StatusRequest, opts ...grpc.CallOption) (*pb.Response, error)
	RequestAction(ctx context.Context, in *pb.ActionRequest, opts ...grpc.CallOption) (*pb.Response, error)
}

Client interface defines functions required for a valid client

func NewClient

func NewClient(host string) (Client, error)

NewClient creates a new EnsembleClient

type EnsembleClient

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

EnsembleClient interacts with client endpoints

func (*EnsembleClient) Close

func (c *EnsembleClient) Close() error

Close closes the created resources (e.g. connection).

func (*EnsembleClient) Connected

func (c *EnsembleClient) Connected() bool

Connected returns true if we are connected and the connection is ready

func (*EnsembleClient) GetHost

func (c *EnsembleClient) GetHost() string

GetHost returns the private hostn name

func (*EnsembleClient) RequestAction

func (c *EnsembleClient) RequestAction(
	ctx context.Context,
	in *pb.ActionRequest,
	opts ...grpc.CallOption,
) (*pb.Response, error)

func (*EnsembleClient) RequestStatus

func (c *EnsembleClient) RequestStatus(
	ctx context.Context,
	in *pb.StatusRequest,
	opts ...grpc.CallOption,
) (*pb.Response, error)

RequestStatus gets the queue and jobs status. This is primarily for scaling/termination

Jump to

Keyboard shortcuts

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