api

package
v0.0.0-...-ff06b4a Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_github_com_amazingchow_photon_dance_delay_queue_pb_task_delay_queue_service_proto protoreflect.FileDescriptor

Functions

func RegisterTaskDelayQueueServiceServer

func RegisterTaskDelayQueueServiceServer(s grpc.ServiceRegistrar, srv TaskDelayQueueServiceServer)

Types

type CheckTaskRequest

type CheckTaskRequest struct {
	TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckTaskRequest) Descriptor deprecated

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

Deprecated: Use CheckTaskRequest.ProtoReflect.Descriptor instead.

func (*CheckTaskRequest) GetTaskId

func (x *CheckTaskRequest) GetTaskId() string

func (*CheckTaskRequest) ProtoMessage

func (*CheckTaskRequest) ProtoMessage()

func (*CheckTaskRequest) ProtoReflect

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

func (*CheckTaskRequest) Reset

func (x *CheckTaskRequest) Reset()

func (*CheckTaskRequest) String

func (x *CheckTaskRequest) String() string

type CheckTaskResponse

type CheckTaskResponse struct {
	Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckTaskResponse) Descriptor deprecated

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

Deprecated: Use CheckTaskResponse.ProtoReflect.Descriptor instead.

func (*CheckTaskResponse) GetTask

func (x *CheckTaskResponse) GetTask() *Task

func (*CheckTaskResponse) ProtoMessage

func (*CheckTaskResponse) ProtoMessage()

func (*CheckTaskResponse) ProtoReflect

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

func (*CheckTaskResponse) Reset

func (x *CheckTaskResponse) Reset()

func (*CheckTaskResponse) String

func (x *CheckTaskResponse) String() string

type FinishTaskRequest

type FinishTaskRequest struct {
	TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	// contains filtered or unexported fields
}

func (*FinishTaskRequest) Descriptor deprecated

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

Deprecated: Use FinishTaskRequest.ProtoReflect.Descriptor instead.

func (*FinishTaskRequest) GetTaskId

func (x *FinishTaskRequest) GetTaskId() string

func (*FinishTaskRequest) ProtoMessage

func (*FinishTaskRequest) ProtoMessage()

func (*FinishTaskRequest) ProtoReflect

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

func (*FinishTaskRequest) Reset

func (x *FinishTaskRequest) Reset()

func (*FinishTaskRequest) String

func (x *FinishTaskRequest) String() string

type FinishTaskResponse

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

func (*FinishTaskResponse) Descriptor deprecated

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

Deprecated: Use FinishTaskResponse.ProtoReflect.Descriptor instead.

func (*FinishTaskResponse) ProtoMessage

func (*FinishTaskResponse) ProtoMessage()

func (*FinishTaskResponse) ProtoReflect

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

func (*FinishTaskResponse) Reset

func (x *FinishTaskResponse) Reset()

func (*FinishTaskResponse) String

func (x *FinishTaskResponse) String() string

type PushTaskRequest

type PushTaskRequest struct {
	Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"`
	// contains filtered or unexported fields
}

func (*PushTaskRequest) Descriptor deprecated

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

Deprecated: Use PushTaskRequest.ProtoReflect.Descriptor instead.

func (*PushTaskRequest) GetTask

func (x *PushTaskRequest) GetTask() *Task

func (*PushTaskRequest) ProtoMessage

func (*PushTaskRequest) ProtoMessage()

func (*PushTaskRequest) ProtoReflect

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

func (*PushTaskRequest) Reset

func (x *PushTaskRequest) Reset()

func (*PushTaskRequest) String

func (x *PushTaskRequest) String() string

type PushTaskResponse

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

func (*PushTaskResponse) Descriptor deprecated

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

Deprecated: Use PushTaskResponse.ProtoReflect.Descriptor instead.

func (*PushTaskResponse) ProtoMessage

func (*PushTaskResponse) ProtoMessage()

func (*PushTaskResponse) ProtoReflect

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

func (*PushTaskResponse) Reset

func (x *PushTaskResponse) Reset()

func (*PushTaskResponse) String

func (x *PushTaskResponse) String() string

type SubscribeTopicRequest

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

func (*SubscribeTopicRequest) Descriptor deprecated

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

Deprecated: Use SubscribeTopicRequest.ProtoReflect.Descriptor instead.

func (*SubscribeTopicRequest) GetTopic

func (x *SubscribeTopicRequest) GetTopic() string

func (*SubscribeTopicRequest) ProtoMessage

func (*SubscribeTopicRequest) ProtoMessage()

func (*SubscribeTopicRequest) ProtoReflect

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

func (*SubscribeTopicRequest) Reset

func (x *SubscribeTopicRequest) Reset()

func (*SubscribeTopicRequest) String

func (x *SubscribeTopicRequest) String() string

type SubscribeTopicResponse

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

func (*SubscribeTopicResponse) Descriptor deprecated

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

Deprecated: Use SubscribeTopicResponse.ProtoReflect.Descriptor instead.

func (*SubscribeTopicResponse) ProtoMessage

func (*SubscribeTopicResponse) ProtoMessage()

func (*SubscribeTopicResponse) ProtoReflect

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

func (*SubscribeTopicResponse) Reset

func (x *SubscribeTopicResponse) Reset()

func (*SubscribeTopicResponse) String

func (x *SubscribeTopicResponse) String() string

type Task

type Task struct {

	// 任务唯一标识, 用来检索/删除指定的任务
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// 任务类型, 可以是具体的业务名称
	AttachedTopic string `protobuf:"bytes,2,opt,name=attached_topic,json=attachedTopic,proto3" json:"attached_topic,omitempty"`
	// 任务需要延迟执行的时间, 单位: 秒
	Delay int32 `protobuf:"varint,3,opt,name=delay,proto3" json:"delay,omitempty"`
	// 任务执行超时的时间, 单位: 秒
	Ttr int32 `protobuf:"varint,4,opt,name=ttr,proto3" json:"ttr,omitempty"`
	// 任务内容, 供消费者做具体的业务处理, 以json格式存储
	Payload string `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*Task) Descriptor deprecated

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

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetAttachedTopic

func (x *Task) GetAttachedTopic() string

func (*Task) GetDelay

func (x *Task) GetDelay() int32

func (*Task) GetId

func (x *Task) GetId() string

func (*Task) GetPayload

func (x *Task) GetPayload() string

func (*Task) GetTtr

func (x *Task) GetTtr() int32

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

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

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

type TaskDelayQueueServiceClient

type TaskDelayQueueServiceClient interface {
	// for task producers
	PushTask(ctx context.Context, in *PushTaskRequest, opts ...grpc.CallOption) (*PushTaskResponse, error)
	FinishTask(ctx context.Context, in *FinishTaskRequest, opts ...grpc.CallOption) (*FinishTaskResponse, error)
	CheckTask(ctx context.Context, in *CheckTaskRequest, opts ...grpc.CallOption) (*CheckTaskResponse, error)
	// for task comsumers
	SubscribeTopic(ctx context.Context, in *SubscribeTopicRequest, opts ...grpc.CallOption) (*SubscribeTopicResponse, error)
	UnsubscribeTopic(ctx context.Context, in *UnsubscribeTopicRequest, opts ...grpc.CallOption) (*UnsubscribeTopicResponse, error)
}

TaskDelayQueueServiceClient is the client API for TaskDelayQueueService 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.

type TaskDelayQueueServiceServer

type TaskDelayQueueServiceServer interface {
	// for task producers
	PushTask(context.Context, *PushTaskRequest) (*PushTaskResponse, error)
	FinishTask(context.Context, *FinishTaskRequest) (*FinishTaskResponse, error)
	CheckTask(context.Context, *CheckTaskRequest) (*CheckTaskResponse, error)
	// for task comsumers
	SubscribeTopic(context.Context, *SubscribeTopicRequest) (*SubscribeTopicResponse, error)
	UnsubscribeTopic(context.Context, *UnsubscribeTopicRequest) (*UnsubscribeTopicResponse, error)
	// contains filtered or unexported methods
}

TaskDelayQueueServiceServer is the server API for TaskDelayQueueService service. All implementations must embed UnimplementedTaskDelayQueueServiceServer for forward compatibility

type UnimplementedTaskDelayQueueServiceServer

type UnimplementedTaskDelayQueueServiceServer struct {
}

UnimplementedTaskDelayQueueServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedTaskDelayQueueServiceServer) CheckTask

func (UnimplementedTaskDelayQueueServiceServer) FinishTask

func (UnimplementedTaskDelayQueueServiceServer) PushTask

func (UnimplementedTaskDelayQueueServiceServer) SubscribeTopic

func (UnimplementedTaskDelayQueueServiceServer) UnsubscribeTopic

type UnsafeTaskDelayQueueServiceServer

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

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

type UnsubscribeTopicRequest

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

func (*UnsubscribeTopicRequest) Descriptor deprecated

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

Deprecated: Use UnsubscribeTopicRequest.ProtoReflect.Descriptor instead.

func (*UnsubscribeTopicRequest) GetTopic

func (x *UnsubscribeTopicRequest) GetTopic() string

func (*UnsubscribeTopicRequest) ProtoMessage

func (*UnsubscribeTopicRequest) ProtoMessage()

func (*UnsubscribeTopicRequest) ProtoReflect

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

func (*UnsubscribeTopicRequest) Reset

func (x *UnsubscribeTopicRequest) Reset()

func (*UnsubscribeTopicRequest) String

func (x *UnsubscribeTopicRequest) String() string

type UnsubscribeTopicResponse

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

func (*UnsubscribeTopicResponse) Descriptor deprecated

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

Deprecated: Use UnsubscribeTopicResponse.ProtoReflect.Descriptor instead.

func (*UnsubscribeTopicResponse) ProtoMessage

func (*UnsubscribeTopicResponse) ProtoMessage()

func (*UnsubscribeTopicResponse) ProtoReflect

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

func (*UnsubscribeTopicResponse) Reset

func (x *UnsubscribeTopicResponse) Reset()

func (*UnsubscribeTopicResponse) String

func (x *UnsubscribeTopicResponse) String() string

Jump to

Keyboard shortcuts

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