Documentation ¶
Index ¶
- type Client
- type RainbowClient
- func (c *RainbowClient) AcceptJobs(ctx context.Context, cluster string, secret string, jobids []int32) (*pb.AcceptJobsResponse, error)
- func (c *RainbowClient) Close() error
- func (c *RainbowClient) Connected() bool
- func (c *RainbowClient) GetHost() string
- func (c *RainbowClient) ReceiveJobs(ctx context.Context, cluster string, secret string, maxJobs int32) (*pb.ReceiveJobsResponse, error)
- func (c *RainbowClient) Register(ctx context.Context, cluster string, secret string, clusterNodes string, ...) (*pb.RegisterResponse, error)
- func (c *RainbowClient) RegisterSubsystem(ctx context.Context, cluster string, secret string, subsystemNodes string, ...) (*pb.RegisterResponse, error)
- func (c *RainbowClient) SubmitJob(ctx context.Context, job *js.Jobspec, cfg *config.RainbowConfig) (*pb.SubmitJobResponse, error)
- func (c *RainbowClient) UpdateState(ctx context.Context, cluster string, secret string, stateFile string) (*pb.UpdateStateResponse, error)
- type RegisterRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Cluster interactions Register(ctx context.Context, clusterName, secret, clusterNodes, subsystem string) (*pb.RegisterResponse, error) RegisterSubsystem(ctx context.Context, clusterName, secret, subsystemNodes, subsystem string) (*pb.RegisterResponse, error) // Update UpdateState(ctx context.Context, clusterName, secret, stateFile string) (*pb.UpdateStateResponse, error) // Job Client Interactions AcceptJobs(ctx context.Context, cluster, secret string, jobids []int32) (*pb.AcceptJobsResponse, error) SubmitJob(ctx context.Context, job *js.Jobspec, cfg *config.RainbowConfig) (*pb.SubmitJobResponse, error) ReceiveJobs(ctx context.Context, cluster, token string, maxJobs int32) (*pb.ReceiveJobsResponse, error) }
Client interface defines functions required for a valid client
type RainbowClient ¶
type RainbowClient struct {
// contains filtered or unexported fields
}
RainbowClient is our instantiation of Client
func (*RainbowClient) AcceptJobs ¶
func (c *RainbowClient) AcceptJobs( ctx context.Context, cluster string, secret string, jobids []int32, ) (*pb.AcceptJobsResponse, error)
RequestJobs requests jobs for a specific cluster
func (*RainbowClient) Close ¶
func (c *RainbowClient) Close() error
Close closes the created resources (e.g. connection).
func (*RainbowClient) Connected ¶
func (c *RainbowClient) Connected() bool
Connected returns true if we are connected and the connection is ready
func (*RainbowClient) GetHost ¶
func (c *RainbowClient) GetHost() string
GetHost returns the private hostn name
func (*RainbowClient) ReceiveJobs ¶
func (c *RainbowClient) ReceiveJobs( ctx context.Context, cluster string, secret string, maxJobs int32, ) (*pb.ReceiveJobsResponse, error)
ReceiveJobs (request them) for a specific clusters
func (*RainbowClient) Register ¶
func (c *RainbowClient) Register( ctx context.Context, cluster string, secret string, clusterNodes string, subsystem string, ) (*pb.RegisterResponse, error)
Register makes a request to register a new cluster
func (*RainbowClient) RegisterSubsystem ¶
func (c *RainbowClient) RegisterSubsystem( ctx context.Context, cluster string, secret string, subsystemNodes string, subsystem string, ) (*pb.RegisterResponse, error)
Register makes a request to register a new cluster
func (*RainbowClient) SubmitJob ¶
func (c *RainbowClient) SubmitJob( ctx context.Context, job *js.Jobspec, cfg *config.RainbowConfig, ) (*pb.SubmitJobResponse, error)
SubmitJob submits a job to a named cluster. The token specific to the cluster is required
func (*RainbowClient) UpdateState ¶
func (c *RainbowClient) UpdateState( ctx context.Context, cluster string, secret string, stateFile string, ) (*pb.UpdateStateResponse, error)
UpdateState of an existing cluster
type RegisterRequest ¶
Click to show internal directories.
Click to hide internal directories.