v1

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Service_Healthy_FullMethodName        = "/cron_client.Service/Healthy"
	Service_ExecTask_FullMethodName       = "/cron_client.Service/ExecTask"
	Service_CancelExecTask_FullMethodName = "/cron_client.Service/CancelExecTask"
)

Variables

View Source
var File_cron_client_service_proto protoreflect.FileDescriptor
View Source
var File_cron_client_task_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cron_client.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Healthy",
			Handler:    _Service_Healthy_Handler,
		},
		{
			MethodName: "CancelExecTask",
			Handler:    _Service_CancelExecTask_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ExecTask",
			Handler:       _Service_ExecTask_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "cron_client_service.proto",
}

Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type CancelExecTaskRequest

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

func (*CancelExecTaskRequest) Descriptor deprecated

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

Deprecated: Use CancelExecTaskRequest.ProtoReflect.Descriptor instead.

func (*CancelExecTaskRequest) GetUuid

func (x *CancelExecTaskRequest) GetUuid() string

func (*CancelExecTaskRequest) ProtoMessage

func (*CancelExecTaskRequest) ProtoMessage()

func (*CancelExecTaskRequest) ProtoReflect

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

func (*CancelExecTaskRequest) Reset

func (x *CancelExecTaskRequest) Reset()

func (*CancelExecTaskRequest) String

func (x *CancelExecTaskRequest) String() string

func (*CancelExecTaskRequest) Validate

func (m *CancelExecTaskRequest) Validate() error

Validate checks the field values on CancelExecTaskRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CancelExecTaskRequest) ValidateAll

func (m *CancelExecTaskRequest) ValidateAll() error

ValidateAll checks the field values on CancelExecTaskRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CancelExecTaskRequestMultiError, or nil if none found.

type CancelExecTaskRequestMultiError

type CancelExecTaskRequestMultiError []error

CancelExecTaskRequestMultiError is an error wrapping multiple validation errors returned by CancelExecTaskRequest.ValidateAll() if the designated constraints aren't met.

func (CancelExecTaskRequestMultiError) AllErrors

func (m CancelExecTaskRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CancelExecTaskRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CancelExecTaskRequestValidationError

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

CancelExecTaskRequestValidationError is the validation error returned by CancelExecTaskRequest.Validate if the designated constraints aren't met.

func (CancelExecTaskRequestValidationError) Cause

Cause function returns cause value.

func (CancelExecTaskRequestValidationError) Error

Error satisfies the builtin error interface

func (CancelExecTaskRequestValidationError) ErrorName

ErrorName returns error name.

func (CancelExecTaskRequestValidationError) Field

Field function returns field value.

func (CancelExecTaskRequestValidationError) Key

Key function returns key value.

func (CancelExecTaskRequestValidationError) Reason

Reason function returns reason value.

type ExecTaskReply

type ExecTaskReply struct {
	Type    string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	Time    uint32 `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*ExecTaskReply) Descriptor deprecated

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

Deprecated: Use ExecTaskReply.ProtoReflect.Descriptor instead.

func (*ExecTaskReply) GetContent

func (x *ExecTaskReply) GetContent() string

func (*ExecTaskReply) GetTime

func (x *ExecTaskReply) GetTime() uint32

func (*ExecTaskReply) GetType

func (x *ExecTaskReply) GetType() string

func (*ExecTaskReply) ProtoMessage

func (*ExecTaskReply) ProtoMessage()

func (*ExecTaskReply) ProtoReflect

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

func (*ExecTaskReply) Reset

func (x *ExecTaskReply) Reset()

func (*ExecTaskReply) String

func (x *ExecTaskReply) String() string

func (*ExecTaskReply) Validate

func (m *ExecTaskReply) Validate() error

Validate checks the field values on ExecTaskReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ExecTaskReply) ValidateAll

func (m *ExecTaskReply) ValidateAll() error

ValidateAll checks the field values on ExecTaskReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ExecTaskReplyMultiError, or nil if none found.

type ExecTaskReplyMultiError

type ExecTaskReplyMultiError []error

ExecTaskReplyMultiError is an error wrapping multiple validation errors returned by ExecTaskReply.ValidateAll() if the designated constraints aren't met.

func (ExecTaskReplyMultiError) AllErrors

func (m ExecTaskReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ExecTaskReplyMultiError) Error

func (m ExecTaskReplyMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ExecTaskReplyValidationError

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

ExecTaskReplyValidationError is the validation error returned by ExecTaskReply.Validate if the designated constraints aren't met.

func (ExecTaskReplyValidationError) Cause

Cause function returns cause value.

func (ExecTaskReplyValidationError) Error

Error satisfies the builtin error interface

func (ExecTaskReplyValidationError) ErrorName

func (e ExecTaskReplyValidationError) ErrorName() string

ErrorName returns error name.

func (ExecTaskReplyValidationError) Field

Field function returns field value.

func (ExecTaskReplyValidationError) Key

Key function returns key value.

func (ExecTaskReplyValidationError) Reason

Reason function returns reason value.

type ExecTaskRequest

type ExecTaskRequest struct {
	Id            uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Type          string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Value         string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	ExpectCode    uint32 `protobuf:"varint,4,opt,name=expect_code,json=expectCode,proto3" json:"expect_code,omitempty"`
	RetryCount    uint32 `protobuf:"varint,5,opt,name=retry_count,json=retryCount,proto3" json:"retry_count,omitempty"`
	RetryWaitTime uint32 `protobuf:"varint,6,opt,name=retry_wait_time,json=retryWaitTime,proto3" json:"retry_wait_time,omitempty"`
	MaxExecTime   uint32 `protobuf:"varint,7,opt,name=max_exec_time,json=maxExecTime,proto3" json:"max_exec_time,omitempty"`
	Uuid          string `protobuf:"bytes,8,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// contains filtered or unexported fields
}

func (*ExecTaskRequest) Descriptor deprecated

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

Deprecated: Use ExecTaskRequest.ProtoReflect.Descriptor instead.

func (*ExecTaskRequest) GetExpectCode

func (x *ExecTaskRequest) GetExpectCode() uint32

func (*ExecTaskRequest) GetId

func (x *ExecTaskRequest) GetId() uint32

func (*ExecTaskRequest) GetMaxExecTime

func (x *ExecTaskRequest) GetMaxExecTime() uint32

func (*ExecTaskRequest) GetRetryCount

func (x *ExecTaskRequest) GetRetryCount() uint32

func (*ExecTaskRequest) GetRetryWaitTime

func (x *ExecTaskRequest) GetRetryWaitTime() uint32

func (*ExecTaskRequest) GetType

func (x *ExecTaskRequest) GetType() string

func (*ExecTaskRequest) GetUuid

func (x *ExecTaskRequest) GetUuid() string

func (*ExecTaskRequest) GetValue

func (x *ExecTaskRequest) GetValue() string

func (*ExecTaskRequest) ProtoMessage

func (*ExecTaskRequest) ProtoMessage()

func (*ExecTaskRequest) ProtoReflect

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

func (*ExecTaskRequest) Reset

func (x *ExecTaskRequest) Reset()

func (*ExecTaskRequest) String

func (x *ExecTaskRequest) String() string

func (*ExecTaskRequest) Validate

func (m *ExecTaskRequest) Validate() error

Validate checks the field values on ExecTaskRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ExecTaskRequest) ValidateAll

func (m *ExecTaskRequest) ValidateAll() error

ValidateAll checks the field values on ExecTaskRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ExecTaskRequestMultiError, or nil if none found.

type ExecTaskRequestMultiError

type ExecTaskRequestMultiError []error

ExecTaskRequestMultiError is an error wrapping multiple validation errors returned by ExecTaskRequest.ValidateAll() if the designated constraints aren't met.

func (ExecTaskRequestMultiError) AllErrors

func (m ExecTaskRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ExecTaskRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ExecTaskRequestValidationError

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

ExecTaskRequestValidationError is the validation error returned by ExecTaskRequest.Validate if the designated constraints aren't met.

func (ExecTaskRequestValidationError) Cause

Cause function returns cause value.

func (ExecTaskRequestValidationError) Error

Error satisfies the builtin error interface

func (ExecTaskRequestValidationError) ErrorName

func (e ExecTaskRequestValidationError) ErrorName() string

ErrorName returns error name.

func (ExecTaskRequestValidationError) Field

Field function returns field value.

func (ExecTaskRequestValidationError) Key

Key function returns key value.

func (ExecTaskRequestValidationError) Reason

Reason function returns reason value.

type ServiceClient

type ServiceClient interface {
	Healthy(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ExecTask(ctx context.Context, in *ExecTaskRequest, opts ...grpc.CallOption) (Service_ExecTaskClient, error)
	CancelExecTask(ctx context.Context, in *CancelExecTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

ServiceClient is the client API for Service 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 NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	Healthy(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	ExecTask(*ExecTaskRequest, Service_ExecTaskServer) error
	CancelExecTask(context.Context, *CancelExecTaskRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type Service_ExecTaskClient

type Service_ExecTaskClient interface {
	Recv() (*ExecTaskReply, error)
	grpc.ClientStream
}

type Service_ExecTaskServer

type Service_ExecTaskServer interface {
	Send(*ExecTaskReply) error
	grpc.ServerStream
}

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) CancelExecTask

func (UnimplementedServiceServer) ExecTask

func (UnimplementedServiceServer) Healthy

type UnsafeServiceServer

type UnsafeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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