proxy

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: AGPL-3.0-only Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomicBool

type AtomicBool int32

Encapsulates a boolean value that is safe to perform conditional set/resets across go-routines.

func NewAtomicBool

func NewAtomicBool() *AtomicBool

Construct a new AtomicBool with a value of false

func (*AtomicBool) ResetIfTrue

func (a *AtomicBool) ResetIfTrue() bool

ResetIfTrue updates the boolean value to false from true. Returns the boolean result of this transition operation, true if successful, false otherwise

func (*AtomicBool) SetIfFalse

func (a *AtomicBool) SetIfFalse() bool

SetIfFalse updates the boolean value to true from false. Returns the boolean result of this transition operation, true if successful, false otherwise

func (*AtomicBool) Value

func (a *AtomicBool) Value() bool

Value returns the current boolean value

type Client

type Client struct {
	ProxyID     string
	ServerAddrs []string
	ConnTimeout time.Duration
	// contains filtered or unexported fields
}

func NewClient

func NewClient(proxyID string, serverAddrs []string, connTimeout time.Duration) *Client

func (*Client) AppendReservation

func (c *Client) AppendReservation(clientID state.ClientID, reqID string, watchedTubes []state.TubeName,
	nowSecs, deadlineAt int64) (*state.Reservation, error)

func (*Client) Bury

func (c *Client) Bury(nowSeconds int64, jobID state.JobID, priority uint32, clientID state.ClientID) error

func (*Client) CheckClientState

func (c *Client) CheckClientState(clientIDs []state.ClientID) ([]state.ClientID,
	[]state.ClientID, []state.ClientID, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Delete

func (c *Client) Delete(jobID state.JobID, clientID state.ClientID) error

func (*Client) GetJob

func (c *Client) GetJob(id state.JobID) (state.Job, error)

func (*Client) GetReservations

func (c *Client) GetReservations() error

func (*Client) GetStatsAsYaml

func (c *Client) GetStatsAsYaml(nowSeconds int64) ([]byte, error)

func (*Client) GetStatsJobAsYaml

func (c *Client) GetStatsJobAsYaml(nowSeconds int64, jobID state.JobID) ([]byte, error)

func (*Client) GetStatsTubeAsYaml

func (c *Client) GetStatsTubeAsYaml(nowSeconds int64, tubeName state.TubeName) ([]byte, error)

func (*Client) GetTubes

func (c *Client) GetTubes() ([]state.TubeName, error)

func (*Client) Kick

func (c *Client) Kick(jobID state.JobID) error

func (*Client) KickN

func (c *Client) KickN(name state.TubeName, n int) (int, error)

func (*Client) Open

func (c *Client) Open() error

func (*Client) PeekBuriedJob

func (c *Client) PeekBuriedJob(tubeName state.TubeName) (state.Job, error)

func (*Client) PeekDelayedJob

func (c *Client) PeekDelayedJob(tubeName state.TubeName) (state.Job, error)

func (*Client) PeekReadyJob

func (c *Client) PeekReadyJob(tubeName state.TubeName) (state.Job, error)

func (*Client) Put

func (c *Client) Put(nowSeconds int64, priority uint32, delay int64, ttr int,
	bodySize int, body []byte, tubeName state.TubeName) (state.JobID, error)

func (*Client) Release

func (c *Client) Release(jobID state.JobID, clientID state.ClientID) error

func (*Client) ReleaseWith

func (c *Client) ReleaseWith(nowSeconds int64, jobID state.JobID, clientID state.ClientID, pri uint32, delay int64) error

func (*Client) Snapshot

func (c *Client) Snapshot() (state.JSMSnapshot, error)

func (*Client) Stop

func (c *Client) Stop() error

func (*Client) Tick

func (c *Client) Tick(nowSeconds int64) ([]*state.Reservation, error)

func (*Client) Touch

func (c *Client) Touch(nowSeconds int64, jobID state.JobID, clientID state.ClientID) error

Jump to

Keyboard shortcuts

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