pb

package
v0.0.0-...-fb1bee7 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Scheduler_Callback_FullMethodName = "/cron.Scheduler/Callback"
)

Variables

View Source
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.

View Source
var File_scheduler_proto protoreflect.FileDescriptor
View Source
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 (*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) Enum

func (CallbackRequest_StatusCode) EnumDescriptor deprecated

func (CallbackRequest_StatusCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use CallbackRequest_StatusCode.Descriptor instead.

func (CallbackRequest_StatusCode) Number

func (CallbackRequest_StatusCode) String

func (CallbackRequest_StatusCode) Type

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

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.

Jump to

Keyboard shortcuts

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