internal

package
v0.0.0-...-0228d8e Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntSet

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

func (*IntSet) Add

func (is *IntSet) Add(value uint64) bool

Add element to set. Returns true if was no value before.

func (*IntSet) Remove

func (is *IntSet) Remove(value uint64) bool

Remove element from set. Return true if was value before.

func (*IntSet) Size

func (is *IntSet) Size() int

Size of set.

type Metadata

type Metadata struct {
	// Payload storing type
	PackageType PackagingType `msg:"t,omitempty"`
	// Payload size in bytes
	Size int64 `msg:"s,omitempty"`
	// Number of attempts. 0 means fresh messaged. Should grow every re-queue operation (except abnormal shutdown).
	Attempts int64 `msg:"a,omitempty"`
	// inline data, valid ony in case package type = inline
	InlineData []byte `msg:"d,omitempty"`
	// user-defined properties
	Properties map[string][]byte `msg:"p,omitempty"`
}

Metadata of message, stored directly in queue.

func (*Metadata) DecodeMsg

func (z *Metadata) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Metadata) EncodeMsg

func (z *Metadata) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Metadata) MarshalMsg

func (z *Metadata) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Metadata) Msgsize

func (z *Metadata) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Metadata) UnmarshalMsg

func (z *Metadata) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type PackagingType

type PackagingType byte

PackagingType defines how to store payload

const (
	InlineData PackagingType = 0 // content stored in next bytes
	LinkedData PackagingType = 1 // content stored in attached file
)

func (*PackagingType) DecodeMsg

func (z *PackagingType) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (PackagingType) EncodeMsg

func (z PackagingType) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (PackagingType) MarshalMsg

func (z PackagingType) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (PackagingType) Msgsize

func (z PackagingType) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*PackagingType) UnmarshalMsg

func (z *PackagingType) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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