example

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_test_example_proto protoreflect.FileDescriptor

Functions

func RegisterUserJobServer

func RegisterUserJobServer(mux *asynq.ServeMux, srv UserJobServer)

Types

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 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 UserJobClient

type UserJobClient 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 NewUserJobClient

func NewUserJobClient(client *asynq.Client) UserJobClient

type UserJobClientImpl

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

func (*UserJobClientImpl) CreateUser

func (c *UserJobClientImpl) CreateUser(ctx context.Context, in *CreateUserPayload, opts ...asynq.Option) (*asynq.TaskInfo, error)

func (*UserJobClientImpl) UpdateUser

func (c *UserJobClientImpl) UpdateUser(ctx context.Context, in *UpdateUserPayload, opts ...asynq.Option) (*asynq.TaskInfo, error)

type UserJobServer

type UserJobServer interface {
	CreateUser(context.Context, *CreateUserPayload) error
	UpdateUser(context.Context, *UpdateUserPayload) error
}

type UserSvcJob added in v1.0.3

type UserSvcJob struct{}
var UserJob UserSvcJob

func (*UserSvcJob) CreateUser added in v1.0.3

func (j *UserSvcJob) CreateUser(in *CreateUserPayload, opts ...asynq.Option) (*asynq.Task, error)

func (*UserSvcJob) UpdateUser added in v1.0.3

func (j *UserSvcJob) UpdateUser(in *UpdateUserPayload, opts ...asynq.Option) (*asynq.Task, error)

Jump to

Keyboard shortcuts

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