Documentation
¶
Index ¶
- Variables
- func TranslateError(err error) error
- type Handler
- func (h *Handler) Get(ctx context.Context, req *grpc.GetRequest) (*grpc.GetResponse, error)
- func (*Handler) Ping(_ context.Context, req *grpc.PingRequest) (*grpc.PingResponse, error)
- func (h *Handler) Run(ctx context.Context, req *grpc.RunRequest) (*grpc.RunResponse, error)
- func (h *Handler) Stop(ctx context.Context, req *grpc.StopRequest) (*grpc.StopResponse, error)
- func (h *Handler) StreamLogs(req *grpc.StreamLogsRequest, gstream grpc.JobService_StreamLogsServer) error
- type JobService
- type TenantGetter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // NilRequestInputError indicates that the received request was nil. NilRequestInputError = status.Error(codes.InvalidArgument, "request cannot be nil") )
Functions ¶
func TranslateError ¶
Types ¶
type Handler ¶
type Handler struct { grpc.UnimplementedJobServiceServer // contains filtered or unexported fields }
Handler handles incoming requests to the Daemon gRPC server.
func NewHandler ¶
func NewHandler(svc JobService, getter TenantGetter) *Handler
NewHandler returns new Handler.
func (*Handler) Get ¶
func (h *Handler) Get(ctx context.Context, req *grpc.GetRequest) (*grpc.GetResponse, error)
func (*Handler) Ping ¶
func (*Handler) Ping(_ context.Context, req *grpc.PingRequest) (*grpc.PingResponse, error)
func (*Handler) Run ¶
func (h *Handler) Run(ctx context.Context, req *grpc.RunRequest) (*grpc.RunResponse, error)
func (*Handler) Stop ¶
func (h *Handler) Stop(ctx context.Context, req *grpc.StopRequest) (*grpc.StopResponse, error)
func (*Handler) StreamLogs ¶
func (h *Handler) StreamLogs(req *grpc.StreamLogsRequest, gstream grpc.JobService_StreamLogsServer) error
type JobService ¶
type JobService interface { Run(context.Context, job.RunInput) (*job.RunOutput, error) Get(context.Context, job.GetInput) (*job.GetOutput, error) Stop(context.Context, job.StopInput) (*job.StopOutput, error) StreamLogs(context.Context, job.StreamLogsInput) (*job.StreamLogsOutput, error) }
JobService provides full functionality to manged Jobs.
type TenantGetter ¶
type TenantGetter interface {
GetJobTenant(in repo.GetJobTenantInput) (repo.GetJobTenantOutput, error)
}
TenantGetter provides functionality to get Job's tenant information.
Click to show internal directories.
Click to hide internal directories.