jobs1beta1

package
v2.18.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Overview

Package jobs1beta1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_managementpb_jobs_jobs_proto protoreflect.FileDescriptor

Functions

func RegisterJobsHandler

func RegisterJobsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterJobsHandler registers the http handlers for service Jobs to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterJobsHandlerClient

func RegisterJobsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client JobsClient) error

RegisterJobsHandlerClient registers the http handlers for service Jobs to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "JobsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "JobsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "JobsClient" to call the correct interceptors.

func RegisterJobsHandlerFromEndpoint

func RegisterJobsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterJobsHandlerFromEndpoint is same as RegisterJobsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterJobsHandlerServer

func RegisterJobsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server JobsServer) error

RegisterJobsHandlerServer registers the http handlers for service Jobs to "mux". UnaryRPC :call JobsServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterJobsHandlerFromEndpoint instead.

func RegisterJobsServer

func RegisterJobsServer(s *grpc.Server, srv JobsServer)

Types

type CancelJobRequest

type CancelJobRequest struct {

	// Unique Job ID. Required.
	JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelJobRequest) Descriptor deprecated

func (*CancelJobRequest) Descriptor() ([]byte, []int)

Deprecated: Use CancelJobRequest.ProtoReflect.Descriptor instead.

func (*CancelJobRequest) GetJobId

func (x *CancelJobRequest) GetJobId() string

func (*CancelJobRequest) ProtoMessage

func (*CancelJobRequest) ProtoMessage()

func (*CancelJobRequest) ProtoReflect

func (x *CancelJobRequest) ProtoReflect() protoreflect.Message

func (*CancelJobRequest) Reset

func (x *CancelJobRequest) Reset()

func (*CancelJobRequest) String

func (x *CancelJobRequest) String() string

func (*CancelJobRequest) Validate

func (this *CancelJobRequest) Validate() error

type CancelJobResponse

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

func (*CancelJobResponse) Descriptor deprecated

func (*CancelJobResponse) Descriptor() ([]byte, []int)

Deprecated: Use CancelJobResponse.ProtoReflect.Descriptor instead.

func (*CancelJobResponse) ProtoMessage

func (*CancelJobResponse) ProtoMessage()

func (*CancelJobResponse) ProtoReflect

func (x *CancelJobResponse) ProtoReflect() protoreflect.Message

func (*CancelJobResponse) Reset

func (x *CancelJobResponse) Reset()

func (*CancelJobResponse) String

func (x *CancelJobResponse) String() string

func (*CancelJobResponse) Validate

func (this *CancelJobResponse) Validate() error

type GetJobRequest

type GetJobRequest struct {

	// Unique Job ID.
	JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetJobRequest) Descriptor deprecated

func (*GetJobRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetJobRequest.ProtoReflect.Descriptor instead.

func (*GetJobRequest) GetJobId

func (x *GetJobRequest) GetJobId() string

func (*GetJobRequest) ProtoMessage

func (*GetJobRequest) ProtoMessage()

func (*GetJobRequest) ProtoReflect

func (x *GetJobRequest) ProtoReflect() protoreflect.Message

func (*GetJobRequest) Reset

func (x *GetJobRequest) Reset()

func (*GetJobRequest) String

func (x *GetJobRequest) String() string

func (*GetJobRequest) Validate

func (this *GetJobRequest) Validate() error

type GetJobResponse

type GetJobResponse struct {

	// Unique Job ID.
	JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// pmm-agent ID where this Job is running / was run.
	PmmAgentId string `protobuf:"bytes,2,opt,name=pmm_agent_id,json=pmmAgentId,proto3" json:"pmm_agent_id,omitempty"`
	// True if Job is finished.
	Done bool `protobuf:"varint,4,opt,name=done,proto3" json:"done,omitempty"`
	// Types that are assignable to Result:
	//	*GetJobResponse_Error_
	//	*GetJobResponse_Echo_
	Result isGetJobResponse_Result `protobuf_oneof:"result"`
	// contains filtered or unexported fields
}

func (*GetJobResponse) Descriptor deprecated

func (*GetJobResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetJobResponse.ProtoReflect.Descriptor instead.

func (*GetJobResponse) GetDone

func (x *GetJobResponse) GetDone() bool

func (*GetJobResponse) GetEcho

func (x *GetJobResponse) GetEcho() *GetJobResponse_Echo

func (*GetJobResponse) GetError

func (x *GetJobResponse) GetError() *GetJobResponse_Error

func (*GetJobResponse) GetJobId

func (x *GetJobResponse) GetJobId() string

func (*GetJobResponse) GetPmmAgentId

func (x *GetJobResponse) GetPmmAgentId() string

func (*GetJobResponse) GetResult

func (m *GetJobResponse) GetResult() isGetJobResponse_Result

func (*GetJobResponse) ProtoMessage

func (*GetJobResponse) ProtoMessage()

func (*GetJobResponse) ProtoReflect

func (x *GetJobResponse) ProtoReflect() protoreflect.Message

func (*GetJobResponse) Reset

func (x *GetJobResponse) Reset()

func (*GetJobResponse) String

func (x *GetJobResponse) String() string

func (*GetJobResponse) Validate

func (this *GetJobResponse) Validate() error

type GetJobResponse_Echo

type GetJobResponse_Echo struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

Echo contains result for echo job.

func (*GetJobResponse_Echo) Descriptor deprecated

func (*GetJobResponse_Echo) Descriptor() ([]byte, []int)

Deprecated: Use GetJobResponse_Echo.ProtoReflect.Descriptor instead.

func (*GetJobResponse_Echo) GetMessage

func (x *GetJobResponse_Echo) GetMessage() string

func (*GetJobResponse_Echo) ProtoMessage

func (*GetJobResponse_Echo) ProtoMessage()

func (*GetJobResponse_Echo) ProtoReflect

func (x *GetJobResponse_Echo) ProtoReflect() protoreflect.Message

func (*GetJobResponse_Echo) Reset

func (x *GetJobResponse_Echo) Reset()

func (*GetJobResponse_Echo) String

func (x *GetJobResponse_Echo) String() string

func (*GetJobResponse_Echo) Validate

func (this *GetJobResponse_Echo) Validate() error

type GetJobResponse_Echo_

type GetJobResponse_Echo_ struct {
	// Echo job result.
	Echo *GetJobResponse_Echo `protobuf:"bytes,11,opt,name=echo,proto3,oneof"`
}

type GetJobResponse_Error

type GetJobResponse_Error struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

Error contains job error message.

func (*GetJobResponse_Error) Descriptor deprecated

func (*GetJobResponse_Error) Descriptor() ([]byte, []int)

Deprecated: Use GetJobResponse_Error.ProtoReflect.Descriptor instead.

func (*GetJobResponse_Error) GetMessage

func (x *GetJobResponse_Error) GetMessage() string

func (*GetJobResponse_Error) ProtoMessage

func (*GetJobResponse_Error) ProtoMessage()

func (*GetJobResponse_Error) ProtoReflect

func (x *GetJobResponse_Error) ProtoReflect() protoreflect.Message

func (*GetJobResponse_Error) Reset

func (x *GetJobResponse_Error) Reset()

func (*GetJobResponse_Error) String

func (x *GetJobResponse_Error) String() string

func (*GetJobResponse_Error) Validate

func (this *GetJobResponse_Error) Validate() error

type GetJobResponse_Error_

type GetJobResponse_Error_ struct {
	// Error result.
	Error *GetJobResponse_Error `protobuf:"bytes,10,opt,name=error,proto3,oneof"`
}

type JobsClient

type JobsClient interface {
	// GetJob gets an result of given Job.
	GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*GetJobResponse, error)
	// StartEchoJob starts echo job.
	StartEchoJob(ctx context.Context, in *StartEchoJobRequest, opts ...grpc.CallOption) (*StartEchoJobResponse, error)
	// CancelJob stops a Job.
	CancelJob(ctx context.Context, in *CancelJobRequest, opts ...grpc.CallOption) (*CancelJobResponse, error)
}

JobsClient is the client API for Jobs service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewJobsClient

func NewJobsClient(cc grpc.ClientConnInterface) JobsClient

type JobsServer

type JobsServer interface {
	// GetJob gets an result of given Job.
	GetJob(context.Context, *GetJobRequest) (*GetJobResponse, error)
	// StartEchoJob starts echo job.
	StartEchoJob(context.Context, *StartEchoJobRequest) (*StartEchoJobResponse, error)
	// CancelJob stops a Job.
	CancelJob(context.Context, *CancelJobRequest) (*CancelJobResponse, error)
}

JobsServer is the server API for Jobs service.

type StartEchoJobRequest

type StartEchoJobRequest struct {

	// pmm-agent ID where to run this Job.
	PmmAgentId string             `protobuf:"bytes,1,opt,name=pmm_agent_id,json=pmmAgentId,proto3" json:"pmm_agent_id,omitempty"`
	Timeout    *duration.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
	Message    string             `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Delay      *duration.Duration `protobuf:"bytes,4,opt,name=delay,proto3" json:"delay,omitempty"`
	// contains filtered or unexported fields
}

func (*StartEchoJobRequest) Descriptor deprecated

func (*StartEchoJobRequest) Descriptor() ([]byte, []int)

Deprecated: Use StartEchoJobRequest.ProtoReflect.Descriptor instead.

func (*StartEchoJobRequest) GetDelay

func (x *StartEchoJobRequest) GetDelay() *duration.Duration

func (*StartEchoJobRequest) GetMessage

func (x *StartEchoJobRequest) GetMessage() string

func (*StartEchoJobRequest) GetPmmAgentId

func (x *StartEchoJobRequest) GetPmmAgentId() string

func (*StartEchoJobRequest) GetTimeout

func (x *StartEchoJobRequest) GetTimeout() *duration.Duration

func (*StartEchoJobRequest) ProtoMessage

func (*StartEchoJobRequest) ProtoMessage()

func (*StartEchoJobRequest) ProtoReflect

func (x *StartEchoJobRequest) ProtoReflect() protoreflect.Message

func (*StartEchoJobRequest) Reset

func (x *StartEchoJobRequest) Reset()

func (*StartEchoJobRequest) String

func (x *StartEchoJobRequest) String() string

func (*StartEchoJobRequest) Validate

func (this *StartEchoJobRequest) Validate() error

type StartEchoJobResponse

type StartEchoJobResponse struct {

	// Unique Job ID.
	JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// pmm-agent ID where to this Job was started.
	PmmAgentId string `protobuf:"bytes,2,opt,name=pmm_agent_id,json=pmmAgentId,proto3" json:"pmm_agent_id,omitempty"`
	// contains filtered or unexported fields
}

func (*StartEchoJobResponse) Descriptor deprecated

func (*StartEchoJobResponse) Descriptor() ([]byte, []int)

Deprecated: Use StartEchoJobResponse.ProtoReflect.Descriptor instead.

func (*StartEchoJobResponse) GetJobId

func (x *StartEchoJobResponse) GetJobId() string

func (*StartEchoJobResponse) GetPmmAgentId

func (x *StartEchoJobResponse) GetPmmAgentId() string

func (*StartEchoJobResponse) ProtoMessage

func (*StartEchoJobResponse) ProtoMessage()

func (*StartEchoJobResponse) ProtoReflect

func (x *StartEchoJobResponse) ProtoReflect() protoreflect.Message

func (*StartEchoJobResponse) Reset

func (x *StartEchoJobResponse) Reset()

func (*StartEchoJobResponse) String

func (x *StartEchoJobResponse) String() string

func (*StartEchoJobResponse) Validate

func (this *StartEchoJobResponse) Validate() error

type UnimplementedJobsServer

type UnimplementedJobsServer struct {
}

UnimplementedJobsServer can be embedded to have forward compatible implementations.

func (*UnimplementedJobsServer) CancelJob

func (*UnimplementedJobsServer) GetJob

func (*UnimplementedJobsServer) StartEchoJob

Jump to

Keyboard shortcuts

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