Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterSchedulerServer(s grpc.ServiceRegistrar, srv SchedulerServer)
- type CallbackRequest
- func (*CallbackRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CallbackRequest) GetCode() CallbackRequest_StatusCode
- func (x *CallbackRequest) GetErrorMsg() string
- func (x *CallbackRequest) GetSchedulerId() string
- func (*CallbackRequest) ProtoMessage()
- func (x *CallbackRequest) ProtoReflect() protoreflect.Message
- func (x *CallbackRequest) Reset()
- func (x *CallbackRequest) String() string
- type CallbackRequest_StatusCode
- func (CallbackRequest_StatusCode) Descriptor() protoreflect.EnumDescriptor
- func (x CallbackRequest_StatusCode) Enum() *CallbackRequest_StatusCode
- func (CallbackRequest_StatusCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x CallbackRequest_StatusCode) Number() protoreflect.EnumNumber
- func (x CallbackRequest_StatusCode) String() string
- func (CallbackRequest_StatusCode) Type() protoreflect.EnumType
- type CallbackResponse
- type SchedulerClient
- type SchedulerServer
- type UnimplementedSchedulerServer
- type UnsafeSchedulerServer
Constants ¶
const (
Scheduler_Callback_FullMethodName = "/cron.Scheduler/Callback"
)
Variables ¶
var ( CallbackRequest_StatusCode_name = map[int32]string{ 0: "SUCCESS", 1: "FAILURE", } CallbackRequest_StatusCode_value = map[string]int32{ "SUCCESS": 0, "FAILURE": 1, } )
Enum value maps for CallbackRequest_StatusCode.
var File_scheduler_proto protoreflect.FileDescriptor
var Scheduler_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cron.Scheduler", HandlerType: (*SchedulerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Callback", Handler: _Scheduler_Callback_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "scheduler.proto", }
Scheduler_ServiceDesc is the grpc.ServiceDesc for Scheduler service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSchedulerServer ¶
func RegisterSchedulerServer(s grpc.ServiceRegistrar, srv SchedulerServer)
Types ¶
type CallbackRequest ¶
type CallbackRequest struct { SchedulerId string `protobuf:"bytes,1,opt,name=scheduler_id,json=schedulerId,proto3" json:"scheduler_id,omitempty"` Code CallbackRequest_StatusCode `protobuf:"varint,2,opt,name=code,proto3,enum=cron.CallbackRequest_StatusCode" json:"code,omitempty"` ErrorMsg string `protobuf:"bytes,3,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` // contains filtered or unexported fields }
func (*CallbackRequest) Descriptor
deprecated
func (*CallbackRequest) Descriptor() ([]byte, []int)
Deprecated: Use CallbackRequest.ProtoReflect.Descriptor instead.
func (*CallbackRequest) GetCode ¶
func (x *CallbackRequest) GetCode() CallbackRequest_StatusCode
func (*CallbackRequest) GetErrorMsg ¶
func (x *CallbackRequest) GetErrorMsg() string
func (*CallbackRequest) GetSchedulerId ¶
func (x *CallbackRequest) GetSchedulerId() string
func (*CallbackRequest) ProtoMessage ¶
func (*CallbackRequest) ProtoMessage()
func (*CallbackRequest) ProtoReflect ¶
func (x *CallbackRequest) ProtoReflect() protoreflect.Message
func (*CallbackRequest) Reset ¶
func (x *CallbackRequest) Reset()
func (*CallbackRequest) String ¶
func (x *CallbackRequest) String() string
type CallbackRequest_StatusCode ¶
type CallbackRequest_StatusCode int32
const ( CallbackRequest_SUCCESS CallbackRequest_StatusCode = 0 CallbackRequest_FAILURE CallbackRequest_StatusCode = 1 )
func (CallbackRequest_StatusCode) Descriptor ¶
func (CallbackRequest_StatusCode) Descriptor() protoreflect.EnumDescriptor
func (CallbackRequest_StatusCode) Enum ¶
func (x CallbackRequest_StatusCode) Enum() *CallbackRequest_StatusCode
func (CallbackRequest_StatusCode) EnumDescriptor
deprecated
func (CallbackRequest_StatusCode) EnumDescriptor() ([]byte, []int)
Deprecated: Use CallbackRequest_StatusCode.Descriptor instead.
func (CallbackRequest_StatusCode) Number ¶
func (x CallbackRequest_StatusCode) Number() protoreflect.EnumNumber
func (CallbackRequest_StatusCode) String ¶
func (x CallbackRequest_StatusCode) String() string
func (CallbackRequest_StatusCode) Type ¶
func (CallbackRequest_StatusCode) Type() protoreflect.EnumType
type CallbackResponse ¶
type CallbackResponse struct {
// contains filtered or unexported fields
}
func (*CallbackResponse) Descriptor
deprecated
func (*CallbackResponse) Descriptor() ([]byte, []int)
Deprecated: Use CallbackResponse.ProtoReflect.Descriptor instead.
func (*CallbackResponse) ProtoMessage ¶
func (*CallbackResponse) ProtoMessage()
func (*CallbackResponse) ProtoReflect ¶
func (x *CallbackResponse) ProtoReflect() protoreflect.Message
func (*CallbackResponse) Reset ¶
func (x *CallbackResponse) Reset()
func (*CallbackResponse) String ¶
func (x *CallbackResponse) String() string
type SchedulerClient ¶
type SchedulerClient interface {
Callback(ctx context.Context, in *CallbackRequest, opts ...grpc.CallOption) (*CallbackResponse, error)
}
SchedulerClient is the client API for Scheduler service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewSchedulerClient ¶
func NewSchedulerClient(cc grpc.ClientConnInterface) SchedulerClient
type SchedulerServer ¶
type SchedulerServer interface { Callback(context.Context, *CallbackRequest) (*CallbackResponse, error) // contains filtered or unexported methods }
SchedulerServer is the server API for Scheduler service. All implementations must embed UnimplementedSchedulerServer for forward compatibility.
type UnimplementedSchedulerServer ¶
type UnimplementedSchedulerServer struct{}
UnimplementedSchedulerServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedSchedulerServer) Callback ¶
func (UnimplementedSchedulerServer) Callback(context.Context, *CallbackRequest) (*CallbackResponse, error)
type UnsafeSchedulerServer ¶
type UnsafeSchedulerServer interface {
// contains filtered or unexported methods
}
UnsafeSchedulerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SchedulerServer will result in compilation errors.