transport

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SinkQueue = "core:default"
	DBIndex   = 0
)
View Source
const (
	//expires in 300 seconds (5min)
	ReturnExpire = 300
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Sink

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

func NewSink

func NewSink(c SinkConfig) (*Sink, error)

func (*Sink) Del

func (sink *Sink) Del(keys ...string) (int64, error)

Del delets keys

func (*Sink) Flag

func (sink *Sink) Flag(id string) error

Flag marks a job ID as running

func (*Sink) Forward

func (sink *Sink) Forward(result *pm.JobResult) error

Forward forwards job result

func (*Sink) Get

func (sink *Sink) Get(key string) ([]byte, error)

Get gets value from key

func (*Sink) GetResult

func (sink *Sink) GetResult(job string, timeout int) (*pm.JobResult, error)

GetResult gets a result of a job if it exists

func (*Sink) LExpire

func (sink *Sink) LExpire(key string, duration int64) (int64, error)

LExpire sets TTL on a list

func (*Sink) LTrim

func (sink *Sink) LTrim(key string, start, stop int64) error

LTrim trims a list

func (*Sink) RPush

func (sink *Sink) RPush(key string, args ...[]byte) (int64, error)

RPush pushes values to the right

func (*Sink) Result

func (sink *Sink) Result(cmd *pm.Command, result *pm.JobResult)

Result handler implementation

func (*Sink) Set

func (sink *Sink) Set(key string, value []byte) error

Set sets a value to a key

func (*Sink) Start

func (sink *Sink) Start()

Start sink

type SinkConfig

type SinkConfig struct {
	Port int
}

func (*SinkConfig) Local

func (c *SinkConfig) Local() string

Jump to

Keyboard shortcuts

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