Documentation ¶
Index ¶
- Constants
- Variables
- func IsRateLimitError(err error) bool
- func RegisterBookTaskServer(s *asynqx.Server, srv BookTaskServer)
- func RegisterUserTaskServer(s *asynqx.Server, srv UserTaskServer)
- func TestServer(t *testing.T)
- type BookSvcTask
- type BookTaskClient
- type BookTaskClientImpl
- type BookTaskServer
- type CreateBookPayload
- type CreateUserPayload
- type RateLimitError
- type UpdateBookPayload
- type UpdateUserPayload
- type UserSvcTask
- type UserTaskClient
- type UserTaskClientImpl
- type UserTaskServer
Constants ¶
View Source
const BookQueueName = "book"
View Source
const UserQueueName = "user"
Variables ¶
View Source
var File_example_example_proto protoreflect.FileDescriptor
Functions ¶
func IsRateLimitError ¶
func RegisterBookTaskServer ¶ added in v1.0.3
func RegisterBookTaskServer(s *asynqx.Server, srv BookTaskServer)
func RegisterUserTaskServer ¶
func RegisterUserTaskServer(s *asynqx.Server, srv UserTaskServer)
func TestServer ¶
Types ¶
type BookSvcTask ¶ added in v1.0.3
type BookSvcTask struct{}
var BookTask BookSvcTask
func (*BookSvcTask) CreateBook ¶ added in v1.0.4
func (j *BookSvcTask) CreateBook(in *CreateBookPayload, opts ...asynq.Option) (*asynq.Task, error)
func (*BookSvcTask) UpdateBook ¶ added in v1.0.4
func (j *BookSvcTask) UpdateBook(in *UpdateBookPayload, opts ...asynq.Option) (*asynq.Task, error)
type BookTaskClient ¶ added in v1.0.3
type BookTaskClient interface { CreateBook(ctx context.Context, req *CreateBookPayload, opts ...asynq.Option) (info *asynq.TaskInfo, err error) UpdateBook(ctx context.Context, req *UpdateBookPayload, opts ...asynq.Option) (info *asynq.TaskInfo, err error) }
func NewBookTaskClient ¶ added in v1.0.3
func NewBookTaskClient(client *asynq.Client) BookTaskClient
type BookTaskClientImpl ¶ added in v1.0.3
type BookTaskClientImpl struct {
// contains filtered or unexported fields
}
func (*BookTaskClientImpl) CreateBook ¶ added in v1.0.4
func (c *BookTaskClientImpl) CreateBook(ctx context.Context, in *CreateBookPayload, opts ...asynq.Option) (*asynq.TaskInfo, error)
func (*BookTaskClientImpl) UpdateBook ¶ added in v1.0.4
func (c *BookTaskClientImpl) UpdateBook(ctx context.Context, in *UpdateBookPayload, opts ...asynq.Option) (*asynq.TaskInfo, error)
type BookTaskServer ¶ added in v1.0.3
type BookTaskServer interface { CreateBook(context.Context, *CreateBookPayload) error UpdateBook(context.Context, *UpdateBookPayload) error }
type CreateBookPayload ¶ added in v1.0.3
type CreateBookPayload struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*CreateBookPayload) Descriptor
deprecated
added in
v1.0.3
func (*CreateBookPayload) Descriptor() ([]byte, []int)
Deprecated: Use CreateBookPayload.ProtoReflect.Descriptor instead.
func (*CreateBookPayload) GetName ¶ added in v1.0.3
func (x *CreateBookPayload) GetName() string
func (*CreateBookPayload) ProtoMessage ¶ added in v1.0.3
func (*CreateBookPayload) ProtoMessage()
func (*CreateBookPayload) ProtoReflect ¶ added in v1.0.3
func (x *CreateBookPayload) ProtoReflect() protoreflect.Message
func (*CreateBookPayload) Reset ¶ added in v1.0.3
func (x *CreateBookPayload) Reset()
func (*CreateBookPayload) String ¶ added in v1.0.3
func (x *CreateBookPayload) String() string
type CreateUserPayload ¶
type CreateUserPayload struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*CreateUserPayload) Descriptor
deprecated
func (*CreateUserPayload) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserPayload.ProtoReflect.Descriptor instead.
func (*CreateUserPayload) GetName ¶
func (x *CreateUserPayload) GetName() string
func (*CreateUserPayload) ProtoMessage ¶
func (*CreateUserPayload) ProtoMessage()
func (*CreateUserPayload) ProtoReflect ¶
func (x *CreateUserPayload) ProtoReflect() protoreflect.Message
func (*CreateUserPayload) Reset ¶
func (x *CreateUserPayload) Reset()
func (*CreateUserPayload) String ¶
func (x *CreateUserPayload) String() string
type RateLimitError ¶
func (*RateLimitError) Error ¶
func (e *RateLimitError) Error() string
type UpdateBookPayload ¶ added in v1.0.3
type UpdateBookPayload struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*UpdateBookPayload) Descriptor
deprecated
added in
v1.0.3
func (*UpdateBookPayload) Descriptor() ([]byte, []int)
Deprecated: Use UpdateBookPayload.ProtoReflect.Descriptor instead.
func (*UpdateBookPayload) GetName ¶ added in v1.0.3
func (x *UpdateBookPayload) GetName() string
func (*UpdateBookPayload) ProtoMessage ¶ added in v1.0.3
func (*UpdateBookPayload) ProtoMessage()
func (*UpdateBookPayload) ProtoReflect ¶ added in v1.0.3
func (x *UpdateBookPayload) ProtoReflect() protoreflect.Message
func (*UpdateBookPayload) Reset ¶ added in v1.0.3
func (x *UpdateBookPayload) Reset()
func (*UpdateBookPayload) String ¶ added in v1.0.3
func (x *UpdateBookPayload) String() string
type UpdateUserPayload ¶
type UpdateUserPayload struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserPayload) Descriptor
deprecated
func (*UpdateUserPayload) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserPayload.ProtoReflect.Descriptor instead.
func (*UpdateUserPayload) GetName ¶
func (x *UpdateUserPayload) GetName() string
func (*UpdateUserPayload) ProtoMessage ¶
func (*UpdateUserPayload) ProtoMessage()
func (*UpdateUserPayload) ProtoReflect ¶
func (x *UpdateUserPayload) ProtoReflect() protoreflect.Message
func (*UpdateUserPayload) Reset ¶
func (x *UpdateUserPayload) Reset()
func (*UpdateUserPayload) String ¶
func (x *UpdateUserPayload) String() string
type UserSvcTask ¶
type UserSvcTask struct{}
var UserTask UserSvcTask
func (*UserSvcTask) CreateUser ¶
func (j *UserSvcTask) CreateUser(in *CreateUserPayload, opts ...asynq.Option) (*asynq.Task, error)
func (*UserSvcTask) UpdateUser ¶
func (j *UserSvcTask) UpdateUser(in *UpdateUserPayload, opts ...asynq.Option) (*asynq.Task, error)
type UserTaskClient ¶
type UserTaskClient interface { CreateUser(ctx context.Context, req *CreateUserPayload, opts ...asynq.Option) (info *asynq.TaskInfo, err error) UpdateUser(ctx context.Context, req *UpdateUserPayload, opts ...asynq.Option) (info *asynq.TaskInfo, err error) }
func NewUserTaskClient ¶
func NewUserTaskClient(client *asynq.Client) UserTaskClient
type UserTaskClientImpl ¶
type UserTaskClientImpl struct {
// contains filtered or unexported fields
}
func (*UserTaskClientImpl) CreateUser ¶
func (c *UserTaskClientImpl) CreateUser(ctx context.Context, in *CreateUserPayload, opts ...asynq.Option) (*asynq.TaskInfo, error)
func (*UserTaskClientImpl) UpdateUser ¶
func (c *UserTaskClientImpl) UpdateUser(ctx context.Context, in *UpdateUserPayload, opts ...asynq.Option) (*asynq.TaskInfo, error)
type UserTaskServer ¶
type UserTaskServer interface { CreateUser(context.Context, *CreateUserPayload) error UpdateUser(context.Context, *UpdateUserPayload) error }
Click to show internal directories.
Click to hide internal directories.