workpb

package
v0.0.0-...-77fc698 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthJob        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowJob          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupJob = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthSystemErrors        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSystemErrors          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSystemErrors = fmt.Errorf("proto: unexpected end of group")
)
View Source
var SystemError_ErrorCode_name = map[int32]string{
	0: "UNKNOWN",
}
View Source
var SystemError_ErrorCode_value = map[string]int32{
	"UNKNOWN": 0,
}

Functions

This section is empty.

Types

type Error

type Error struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"m,omitempty"`
	Type    string `protobuf:"bytes,2,opt,name=type,proto3" json:"t,omitempty"`
}

func (*Error) Descriptor

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

func (*Error) Equal

func (this *Error) Equal(that interface{}) bool

func (*Error) GetMessage

func (m *Error) GetMessage() string

func (*Error) GetType

func (m *Error) GetType() string

func (*Error) GoString

func (this *Error) GoString() string

func (*Error) Marshal

func (m *Error) Marshal() (dAtA []byte, err error)

func (*Error) MarshalTo

func (m *Error) MarshalTo(dAtA []byte) (int, error)

func (*Error) MarshalToSizedBuffer

func (m *Error) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) Size

func (m *Error) Size() (n int)

func (*Error) String

func (this *Error) String() string

func (*Error) Unmarshal

func (m *Error) Unmarshal(dAtA []byte) error

func (*Error) XXX_DiscardUnknown

func (m *Error) XXX_DiscardUnknown()

func (*Error) XXX_Marshal

func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Error) XXX_Merge

func (m *Error) XXX_Merge(src proto.Message)

func (*Error) XXX_Size

func (m *Error) XXX_Size() int

func (*Error) XXX_Unmarshal

func (m *Error) XXX_Unmarshal(b []byte) error

type Failure

type Failure struct {
	RetryCount int32    `protobuf:"varint,1,opt,name=retry_count,json=retryCount,proto3" json:"rc,omitempty"`
	FailedAt   int64    `protobuf:"varint,2,opt,name=failed_at,json=failedAt,proto3" json:"fat,omitempty"`
	NextAt     int64    `protobuf:"varint,3,opt,name=next_at,json=nextAt,proto3" json:"nat,omitempty"`
	Error      *Error   `protobuf:"bytes,4,opt,name=error,proto3" json:"e,omitempty"`
	Backtrace  []string `protobuf:"bytes,5,rep,name=backtrace,proto3" json:"bt,omitempty"`
}

func (*Failure) Descriptor

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

func (*Failure) Equal

func (this *Failure) Equal(that interface{}) bool

func (*Failure) GetBacktrace

func (m *Failure) GetBacktrace() []string

func (*Failure) GetError

func (m *Failure) GetError() *Error

func (*Failure) GetFailedAt

func (m *Failure) GetFailedAt() int64

func (*Failure) GetNextAt

func (m *Failure) GetNextAt() int64

func (*Failure) GetRetryCount

func (m *Failure) GetRetryCount() int32

func (*Failure) GoString

func (this *Failure) GoString() string

func (*Failure) Marshal

func (m *Failure) Marshal() (dAtA []byte, err error)

func (*Failure) MarshalTo

func (m *Failure) MarshalTo(dAtA []byte) (int, error)

func (*Failure) MarshalToSizedBuffer

func (m *Failure) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Failure) ProtoMessage

func (*Failure) ProtoMessage()

func (*Failure) Reset

func (m *Failure) Reset()

func (*Failure) Size

func (m *Failure) Size() (n int)

func (*Failure) String

func (this *Failure) String() string

func (*Failure) Unmarshal

func (m *Failure) Unmarshal(dAtA []byte) error

func (*Failure) XXX_DiscardUnknown

func (m *Failure) XXX_DiscardUnknown()

func (*Failure) XXX_Marshal

func (m *Failure) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Failure) XXX_Merge

func (m *Failure) XXX_Merge(src proto.Message)

func (*Failure) XXX_Size

func (m *Failure) XXX_Size() int

func (*Failure) XXX_Unmarshal

func (m *Failure) XXX_Unmarshal(b []byte) error

type Job

type Job struct {
	// Universally Unique Lexicographically Sortable Identifier (ULID)
	// https://github.com/oklog/ulid
	Id         string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Namespace  string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"ns,omitempty"`
	Queue      string `protobuf:"bytes,3,opt,name=queue,proto3" json:"q,omitempty"`
	Type       string `protobuf:"bytes,4,opt,name=type,proto3" json:"t,omitempty"`
	Body       []byte `protobuf:"bytes,6,opt,name=body,proto3" json:"bd,omitempty"`
	CreatedAt  int64  `protobuf:"varint,7,opt,name=created_at,json=createdAt,proto3" json:"cat,omitempty"`
	EnqueuedAt int64  `protobuf:"varint,8,opt,name=enqueued_at,json=enqueuedAt,proto3" json:"eat,omitempty"`
	At         int64  `protobuf:"varint,9,opt,name=at,proto3" json:"at,omitempty"`
	// TTL in seconds
	Ttl     uint32   `protobuf:"varint,10,opt,name=ttl,proto3" json:"to,omitempty"`
	Retry   uint32   `protobuf:"varint,11,opt,name=retry,proto3" json:"rt,omitempty"`
	Failure *Failure `protobuf:"bytes,12,opt,name=failure,proto3" json:"f,omitempty"`
}

func New

func New(namespace, queue string, typ string, body []byte, delay, tries uint32) *Job

New build a Job, not allocate a bare struct directly.

func (*Job) Descriptor

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

func (*Job) Equal

func (this *Job) Equal(that interface{}) bool

func (*Job) GetAt

func (m *Job) GetAt() int64

func (*Job) GetBody

func (m *Job) GetBody() []byte

func (*Job) GetCreatedAt

func (m *Job) GetCreatedAt() int64

func (*Job) GetEnqueuedAt

func (m *Job) GetEnqueuedAt() int64

func (*Job) GetFailure

func (m *Job) GetFailure() *Failure

func (*Job) GetId

func (m *Job) GetId() string

func (*Job) GetNamespace

func (m *Job) GetNamespace() string

func (*Job) GetQueue

func (m *Job) GetQueue() string

func (*Job) GetRetry

func (m *Job) GetRetry() uint32

func (*Job) GetTtl

func (m *Job) GetTtl() uint32

func (*Job) GetType

func (m *Job) GetType() string

func (*Job) GoString

func (this *Job) GoString() string

func (*Job) Marshal

func (m *Job) Marshal() (dAtA []byte, err error)

func (*Job) MarshalTo

func (m *Job) MarshalTo(dAtA []byte) (int, error)

func (*Job) MarshalToSizedBuffer

func (m *Job) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) Reset

func (m *Job) Reset()

func (*Job) Size

func (m *Job) Size() (n int)

func (*Job) String

func (this *Job) String() string

func (*Job) Unmarshal

func (m *Job) Unmarshal(dAtA []byte) error

func (*Job) XXX_DiscardUnknown

func (m *Job) XXX_DiscardUnknown()

func (*Job) XXX_Marshal

func (m *Job) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Job) XXX_Merge

func (m *Job) XXX_Merge(src proto.Message)

func (*Job) XXX_Size

func (m *Job) XXX_Size() int

func (*Job) XXX_Unmarshal

func (m *Job) XXX_Unmarshal(b []byte) error

type SystemError

type SystemError struct {
	Code      SystemError_ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=workpb.SystemError_ErrorCode" json:"c,omitempty"`
	Message   string                `protobuf:"bytes,2,opt,name=message,proto3" json:"m,omitempty"`
	Backtrace []string              `protobuf:"bytes,3,rep,name=backtrace,proto3" json:"bt,omitempty"`
}

func (*SystemError) Descriptor

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

func (*SystemError) Equal

func (this *SystemError) Equal(that interface{}) bool

func (*SystemError) GetBacktrace

func (m *SystemError) GetBacktrace() []string

func (*SystemError) GetCode

func (m *SystemError) GetCode() SystemError_ErrorCode

func (*SystemError) GetMessage

func (m *SystemError) GetMessage() string

func (*SystemError) GoString

func (this *SystemError) GoString() string

func (*SystemError) Marshal

func (m *SystemError) Marshal() (dAtA []byte, err error)

func (*SystemError) MarshalTo

func (m *SystemError) MarshalTo(dAtA []byte) (int, error)

func (*SystemError) MarshalToSizedBuffer

func (m *SystemError) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SystemError) ProtoMessage

func (*SystemError) ProtoMessage()

func (*SystemError) Reset

func (m *SystemError) Reset()

func (*SystemError) Size

func (m *SystemError) Size() (n int)

func (*SystemError) String

func (this *SystemError) String() string

func (*SystemError) Unmarshal

func (m *SystemError) Unmarshal(dAtA []byte) error

func (*SystemError) XXX_DiscardUnknown

func (m *SystemError) XXX_DiscardUnknown()

func (*SystemError) XXX_Marshal

func (m *SystemError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SystemError) XXX_Merge

func (m *SystemError) XXX_Merge(src proto.Message)

func (*SystemError) XXX_Size

func (m *SystemError) XXX_Size() int

func (*SystemError) XXX_Unmarshal

func (m *SystemError) XXX_Unmarshal(b []byte) error

type SystemError_ErrorCode

type SystemError_ErrorCode int32
const (
	UNKNOWN SystemError_ErrorCode = 0
)

func (SystemError_ErrorCode) EnumDescriptor

func (SystemError_ErrorCode) EnumDescriptor() ([]byte, []int)

func (SystemError_ErrorCode) String

func (x SystemError_ErrorCode) String() string

Jump to

Keyboard shortcuts

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