v1

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Task_Healthy_FullMethodName        = "/cron.api.cron.client.v1.Task/Healthy"
	Task_ExecTask_FullMethodName       = "/cron.api.cron.client.v1.Task/ExecTask"
	Task_CancelExecTask_FullMethodName = "/cron.api.cron.client.v1.Task/CancelExecTask"
)

Variables

View Source
var File_api_cron_client_cron_client_service_proto protoreflect.FileDescriptor
View Source
var File_api_cron_client_cron_client_task_proto protoreflect.FileDescriptor
View Source
var Task_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cron.api.cron.client.v1.Task",
	HandlerType: (*TaskServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Healthy",
			Handler:    _Task_Healthy_Handler,
		},
		{
			MethodName: "CancelExecTask",
			Handler:    _Task_CancelExecTask_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ExecTask",
			Handler:       _Task_ExecTask_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "api/cron/client/cron_client_service.proto",
}

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

Functions

func RegisterTaskServer added in v1.0.21

func RegisterTaskServer(s grpc.ServiceRegistrar, srv TaskServer)

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=expectCode,proto3" json:"expectCode,omitempty"`
	RetryCount    uint32 `protobuf:"varint,5,opt,name=retryCount,proto3" json:"retryCount,omitempty"`
	RetryWaitTime uint32 `protobuf:"varint,6,opt,name=retryWaitTime,proto3" json:"retryWaitTime,omitempty"`
	MaxExecTime   uint32 `protobuf:"varint,7,opt,name=maxExecTime,proto3" json:"maxExecTime,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 TaskClient added in v1.0.21

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

TaskClient is the client API for Task 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 NewTaskClient added in v1.0.21

func NewTaskClient(cc grpc.ClientConnInterface) TaskClient

type TaskServer added in v1.0.21

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

TaskServer is the server API for Task service. All implementations must embed UnimplementedTaskServer for forward compatibility

type Task_ExecTaskClient added in v1.0.21

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

type Task_ExecTaskServer added in v1.0.21

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

type UnimplementedTaskServer added in v1.0.21

type UnimplementedTaskServer struct {
}

UnimplementedTaskServer must be embedded to have forward compatible implementations.

func (UnimplementedTaskServer) CancelExecTask added in v1.0.21

func (UnimplementedTaskServer) ExecTask added in v1.0.21

func (UnimplementedTaskServer) Healthy added in v1.0.21

type UnsafeTaskServer added in v1.0.21

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

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

Jump to

Keyboard shortcuts

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