Documentation ¶
Index ¶
- Variables
- type BuryCommand
- type BuryCommandResponse
- type Client
- func (c *Client) Bury(id int, priority uint32) error
- func (c *Client) Check() error
- func (c *Client) Close() error
- func (c *Client) ClosedAt() time.Time
- func (c *Client) CreatedAt() time.Time
- func (c *Client) Delete(id int) error
- func (c *Client) ExecuteCommand(command Command) (CommandResponse, error)
- func (c *Client) Ignore(tube string) (int, error)
- func (c *Client) Kick(bound int) (int, error)
- func (c *Client) KickJob(id int) error
- func (c *Client) ListTubeUsed() (string, error)
- func (c *Client) ListTubes() ([]string, error)
- func (c *Client) ListTubesWatched() ([]string, error)
- func (c *Client) PauseTube(tube string, delay time.Duration) error
- func (c *Client) Peek(id int) (*Job, error)
- func (c *Client) PeekBuried() (*Job, error)
- func (c *Client) PeekDelayed() (*Job, error)
- func (c *Client) PeekReady() (*Job, error)
- func (c *Client) Put(priority uint32, delay, ttr time.Duration, data []byte) (int, error)
- func (c *Client) Release(id int, priority uint32, delay time.Duration) error
- func (c *Client) Reserve() (*Job, error)
- func (c *Client) ReserveJob(id int) (*Job, error)
- func (c *Client) ReserveWithTimeout(timeout time.Duration) (*Job, error)
- func (c *Client) Stats() (*Stats, error)
- func (c *Client) StatsJob(id int) (*StatsJob, error)
- func (c *Client) StatsTube(tube string) (*StatsTube, error)
- func (c *Client) Touch(id int) error
- func (c *Client) Use(tube string) (string, error)
- func (c *Client) UsedAt() time.Time
- func (c *Client) Watch(tube string) (int, error)
- type Command
- type CommandResponse
- type CommandResponseBuilder
- type DeleteCommand
- type DeleteCommandResponse
- type IgnoreCommand
- type IgnoreCommandResponse
- type Job
- type KickCommand
- type KickCommandResponse
- type KickJobCommand
- type KickJobCommandResponse
- type ListTubeUsedCommand
- type ListTubeUsedCommandResponse
- type ListTubesCommand
- type ListTubesCommandResponse
- type ListTubesWatchedCommand
- type ListTubesWatchedCommandResponse
- type LogLevel
- type Logger
- type PauseTubeCommand
- type PauseTubeCommandResponse
- type PeekBuriedCommand
- type PeekBuriedCommandResponse
- type PeekCommand
- type PeekCommandResponse
- type PeekDelayedCommand
- type PeekDelayedCommandResponse
- type PeekReadyCommand
- type PeekReadyCommandResponse
- type Pool
- type PoolOptions
- type PutCommand
- type PutCommandResponse
- type ReleaseCommand
- type ReleaseCommandResponse
- type ReserveCommand
- type ReserveCommandResponse
- type ReserveJobCommand
- type ReserveJobCommandResponse
- type ReserveWithTimeoutCommand
- type ReserveWithTimeoutCommandResponse
- type Stats
- type StatsCommand
- type StatsCommandResponse
- type StatsJob
- type StatsJobCommand
- type StatsJobCommandResponse
- type StatsTube
- type StatsTubeCommand
- type StatsTubeCommandResponse
- type TouchCommand
- type TouchCommandResponse
- type UseCommand
- type UseCommandResponse
- type WatchCommand
- type WatchCommandResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadFormat = errors.New("beanstalk: bad format") ErrBuried = errors.New("beanstalk: buried") ErrDeadlineSoon = errors.New("beanstalk: deadline soon") ErrDraining = errors.New("beanstalk: draining") ErrExpectedCRLF = errors.New("beanstalk: expected CRLF") ErrInternalError = errors.New("beanstalk: internal error") ErrJobTooBig = errors.New("beanstalk: job too big") ErrNotFound = errors.New("beanstalk: not found") ErrNotIgnored = errors.New("beanstalk: not ignored") ErrOutOfMemory = errors.New("beanstalk: out of memory") ErrTimedOut = errors.New("beanstalk: timed out") ErrUnknownCommand = errors.New("beanstalk: unknown command") ErrMalformedCommand = errors.New("beanstalk: malformed command") ErrUnexpectedResponse = errors.New("beanstalk: unexpected response") )
View Source
var ( ErrAlreadyOpenedPool = errors.New("beanstalk: pool: already opened") ErrClosedPool = errors.New("beanstalk: pool: closed") ErrDialerNotSpecified = errors.New("beanstalk: pool: dialer not specified") )
View Source
var NopLogger = &nopLogger{}
Functions ¶
This section is empty.
Types ¶
type BuryCommand ¶
func (BuryCommand) Body ¶
func (c BuryCommand) Body() []byte
func (BuryCommand) BuildResponse ¶
func (c BuryCommand) BuildResponse(responseLine string, _ []byte) (CommandResponse, error)
func (BuryCommand) CommandLine ¶
func (c BuryCommand) CommandLine() string
func (BuryCommand) HasResponseBody ¶
func (c BuryCommand) HasResponseBody() bool
type BuryCommandResponse ¶
type BuryCommandResponse struct{}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(conn io.ReadWriteCloser) *Client
func (*Client) ExecuteCommand ¶
func (c *Client) ExecuteCommand(command Command) (CommandResponse, error)
func (*Client) ListTubeUsed ¶
func (*Client) ListTubesWatched ¶
func (*Client) PeekBuried ¶
func (*Client) PeekDelayed ¶
func (*Client) ReserveWithTimeout ¶
type CommandResponse ¶
type CommandResponse interface{}
type CommandResponseBuilder ¶
type CommandResponseBuilder interface {
BuildResponse(responseLine string, data []byte) (CommandResponse, error)
}
type DeleteCommand ¶
type DeleteCommand struct {
ID int
}
func (DeleteCommand) Body ¶
func (c DeleteCommand) Body() []byte
func (DeleteCommand) BuildResponse ¶
func (c DeleteCommand) BuildResponse(responseLine string, _ []byte) (CommandResponse, error)
func (DeleteCommand) CommandLine ¶
func (c DeleteCommand) CommandLine() string
func (DeleteCommand) HasResponseBody ¶
func (c DeleteCommand) HasResponseBody() bool
type DeleteCommandResponse ¶
type DeleteCommandResponse struct{}
type IgnoreCommand ¶
type IgnoreCommand struct {
Tube string
}
func (IgnoreCommand) Body ¶
func (c IgnoreCommand) Body() []byte
func (IgnoreCommand) BuildResponse ¶
func (c IgnoreCommand) BuildResponse(responseLine string, _ []byte) (CommandResponse, error)
func (IgnoreCommand) CommandLine ¶
func (c IgnoreCommand) CommandLine() string
func (IgnoreCommand) HasResponseBody ¶
func (c IgnoreCommand) HasResponseBody() bool
type IgnoreCommandResponse ¶
type IgnoreCommandResponse struct {
Count int
}
type KickCommand ¶
type KickCommand struct {
Bound int
}
func (KickCommand) Body ¶
func (c KickCommand) Body() []byte
func (KickCommand) BuildResponse ¶
func (c KickCommand) BuildResponse(responseLine string, _ []byte) (CommandResponse, error)
func (KickCommand) CommandLine ¶
func (c KickCommand) CommandLine() string
func (KickCommand) HasResponseBody ¶
func (c KickCommand) HasResponseBody() bool
type KickCommandResponse ¶
type KickCommandResponse struct {
Count int
}
type KickJobCommand ¶
type KickJobCommand struct {
ID int
}
func (KickJobCommand) Body ¶
func (c KickJobCommand) Body() []byte
func (KickJobCommand) BuildResponse ¶
func (c KickJobCommand) BuildResponse(responseLine string, _ []byte) (CommandResponse, error)
func (KickJobCommand) CommandLine ¶
func (c KickJobCommand) CommandLine() string
func (KickJobCommand) HasResponseBody ¶
func (c KickJobCommand) HasResponseBody() bool
type KickJobCommandResponse ¶
type KickJobCommandResponse struct{}
type ListTubeUsedCommand ¶
type ListTubeUsedCommand struct{}
func (ListTubeUsedCommand) Body ¶
func (c ListTubeUsedCommand) Body() []byte
func (ListTubeUsedCommand) BuildResponse ¶
func (c ListTubeUsedCommand) BuildResponse(responseLine string, _ []byte) (CommandResponse, error)
func (ListTubeUsedCommand) CommandLine ¶
func (c ListTubeUsedCommand) CommandLine() string
func (ListTubeUsedCommand) HasResponseBody ¶
func (c ListTubeUsedCommand) HasResponseBody() bool
type ListTubeUsedCommandResponse ¶
type ListTubeUsedCommandResponse struct {
Tube string
}
type ListTubesCommand ¶
type ListTubesCommand struct{}
func (ListTubesCommand) Body ¶
func (c ListTubesCommand) Body() []byte
func (ListTubesCommand) BuildResponse ¶
func (c ListTubesCommand) BuildResponse(responseLine string, body []byte) (CommandResponse, error)
func (ListTubesCommand) CommandLine ¶
func (c ListTubesCommand) CommandLine() string
func (ListTubesCommand) HasResponseBody ¶
func (c ListTubesCommand) HasResponseBody() bool
type ListTubesCommandResponse ¶
type ListTubesCommandResponse struct {
Data []byte
}
type ListTubesWatchedCommand ¶
type ListTubesWatchedCommand struct{}
func (ListTubesWatchedCommand) Body ¶
func (c ListTubesWatchedCommand) Body() []byte
func (ListTubesWatchedCommand) BuildResponse ¶
func (c ListTubesWatchedCommand) BuildResponse(responseLine string, body []byte) (CommandResponse, error)
func (ListTubesWatchedCommand) CommandLine ¶
func (c ListTubesWatchedCommand) CommandLine() string
func (ListTubesWatchedCommand) HasResponseBody ¶
func (c ListTubesWatchedCommand) HasResponseBody() bool
type ListTubesWatchedCommandResponse ¶
type ListTubesWatchedCommandResponse struct {
Data []byte
}
type PauseTubeCommand ¶
func (PauseTubeCommand) Body ¶
func (c PauseTubeCommand) Body() []byte
func (PauseTubeCommand) BuildResponse ¶
func (c PauseTubeCommand) BuildResponse(responseLine string, _ []byte) (CommandResponse, error)
func (PauseTubeCommand) CommandLine ¶
func (c PauseTubeCommand) CommandLine() string
func (PauseTubeCommand) HasResponseBody ¶
func (c PauseTubeCommand) HasResponseBody() bool
type PauseTubeCommandResponse ¶
type PauseTubeCommandResponse struct{}
type PeekBuriedCommand ¶
type PeekBuriedCommand struct{}
func (PeekBuriedCommand) Body ¶
func (c PeekBuriedCommand) Body() []byte
func (PeekBuriedCommand) BuildResponse ¶
func (c PeekBuriedCommand) BuildResponse(responseLine string, body []byte) (CommandResponse, error)
func (PeekBuriedCommand) CommandLine ¶
func (c PeekBuriedCommand) CommandLine() string
func (PeekBuriedCommand) HasResponseBody ¶
func (c PeekBuriedCommand) HasResponseBody() bool
type PeekCommand ¶
type PeekCommand struct {
ID int
}
func (PeekCommand) Body ¶
func (c PeekCommand) Body() []byte
func (PeekCommand) BuildResponse ¶
func (c PeekCommand) BuildResponse(responseLine string, body []byte) (CommandResponse, error)
func (PeekCommand) CommandLine ¶
func (c PeekCommand) CommandLine() string
func (PeekCommand) HasResponseBody ¶
func (c PeekCommand) HasResponseBody() bool
type PeekCommandResponse ¶
type PeekDelayedCommand ¶
type PeekDelayedCommand struct{}
func (PeekDelayedCommand) Body ¶
func (c PeekDelayedCommand) Body() []byte
func (PeekDelayedCommand) BuildResponse ¶
func (c PeekDelayedCommand) BuildResponse(responseLine string, body []byte) (CommandResponse, error)
func (PeekDelayedCommand) CommandLine ¶
func (c PeekDelayedCommand) CommandLine() string
func (PeekDelayedCommand) HasResponseBody ¶
func (c PeekDelayedCommand) HasResponseBody() bool
type PeekReadyCommand ¶
type PeekReadyCommand struct{}
func (PeekReadyCommand) Body ¶
func (c PeekReadyCommand) Body() []byte
func (PeekReadyCommand) BuildResponse ¶
func (c PeekReadyCommand) BuildResponse(responseLine string, body []byte) (CommandResponse, error)
func (PeekReadyCommand) CommandLine ¶
func (c PeekReadyCommand) CommandLine() string
func (PeekReadyCommand) HasResponseBody ¶
func (c PeekReadyCommand) HasResponseBody() bool
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func NewDefaultPool ¶
func NewDefaultPool(options *PoolOptions) *Pool
type PoolOptions ¶ added in v0.7.0
type PutCommand ¶
func (PutCommand) Body ¶
func (c PutCommand) Body() []byte
func (PutCommand) BuildResponse ¶
func (c PutCommand) BuildResponse(responseLine string, _ []byte) (CommandResponse, error)
func (PutCommand) CommandLine ¶
func (c PutCommand) CommandLine() string
func (PutCommand) HasResponseBody ¶
func (c PutCommand) HasResponseBody() bool
type PutCommandResponse ¶
type PutCommandResponse struct {
ID int
}
type ReleaseCommand ¶
func (ReleaseCommand) Body ¶
func (c ReleaseCommand) Body() []byte
func (ReleaseCommand) BuildResponse ¶
func (c ReleaseCommand) BuildResponse(responseLine string, _ []byte) (CommandResponse, error)
func (ReleaseCommand) CommandLine ¶
func (c ReleaseCommand) CommandLine() string
func (ReleaseCommand) HasResponseBody ¶
func (c ReleaseCommand) HasResponseBody() bool
type ReleaseCommandResponse ¶
type ReleaseCommandResponse struct{}
type ReserveCommand ¶
type ReserveCommand struct{}
func (ReserveCommand) Body ¶
func (c ReserveCommand) Body() []byte
func (ReserveCommand) BuildResponse ¶
func (c ReserveCommand) BuildResponse(responseLine string, body []byte) (CommandResponse, error)
func (ReserveCommand) CommandLine ¶
func (c ReserveCommand) CommandLine() string
func (ReserveCommand) HasResponseBody ¶
func (c ReserveCommand) HasResponseBody() bool
type ReserveCommandResponse ¶
type ReserveJobCommand ¶
type ReserveJobCommand struct {
ID int
}
func (ReserveJobCommand) Body ¶
func (c ReserveJobCommand) Body() []byte
func (ReserveJobCommand) BuildResponse ¶
func (c ReserveJobCommand) BuildResponse(responseLine string, body []byte) (CommandResponse, error)
func (ReserveJobCommand) CommandLine ¶
func (c ReserveJobCommand) CommandLine() string
func (ReserveJobCommand) HasResponseBody ¶
func (c ReserveJobCommand) HasResponseBody() bool
type ReserveWithTimeoutCommand ¶
func (ReserveWithTimeoutCommand) Body ¶
func (c ReserveWithTimeoutCommand) Body() []byte
func (ReserveWithTimeoutCommand) BuildResponse ¶
func (c ReserveWithTimeoutCommand) BuildResponse(responseLine string, body []byte) (CommandResponse, error)
func (ReserveWithTimeoutCommand) CommandLine ¶
func (c ReserveWithTimeoutCommand) CommandLine() string
func (ReserveWithTimeoutCommand) HasResponseBody ¶
func (c ReserveWithTimeoutCommand) HasResponseBody() bool
type Stats ¶
type Stats struct { // is the number of ready jobs with priority < 1024 CurrentJobsUrgent int `json:"currentJobsUrgent" yaml:"current-jobs-urgent"` // is the number of jobs in the ready queue CurrentJobsReady int `json:"currentJobsReady" yaml:"current-jobs-ready"` // is the number of jobs reserved by all clients CurrentJobsReserved int `json:"currentJobsReserved" yaml:"current-jobs-reserved"` // is the number of delayed jobs CurrentJobsDelayed int `json:"currentJobsDelayed" yaml:"current-jobs-delayed"` // is the number of buried jobs CurrentJobsBuried int `json:"currentJobsBuried" yaml:"current-jobs-buried"` // is the cumulative number of put commands CmdPut int `json:"cmdPut" yaml:"cmd-put"` // is the cumulative number of peek commands CmdPeek int `json:"cmdPeek" yaml:"cmd-peek"` // is the cumulative number of peek-ready commands CmdPeekReady int `json:"cmdPeekReady" yaml:"cmd-peek-ready"` // is the cumulative number of peek-delayed commands CmdPeekDelayed int `json:"cmdPeekDelayed" yaml:"cmd-peek-delayed"` // is the cumulative number of peek-buried commands CmdPeekBuried int `json:"cmdPeekBuried" yaml:"cmd-peek-buried"` // is the cumulative number of reserve commands CmdReserve int `json:"cmdReserve" yaml:"cmd-reserve"` // is the cumulative number of use commands CmdUse int `json:"cmdUse" yaml:"cmd-use"` // is the cumulative number of watch commands CmdWatch int `json:"cmdWatch" yaml:"cmd-watch"` // is the cumulative number of ignore commands CmdIgnore int `json:"cmdIgnore" yaml:"cmd-ignore"` // is the cumulative number of delete commands CmdDelete int `json:"cmdDelete" yaml:"cmd-delete"` // is the cumulative number of release commands CmdRelease int `json:"cmdRelease" yaml:"cmd-release"` // is the cumulative number of bury commands CmdBury int `json:"cmdBury" yaml:"cmd-bury"` // is the cumulative number of kick commands CmdKick int `json:"cmdKick" yaml:"cmd-kick"` // is the cumulative number of touch commands CmdTouch int `json:"cmdTouch" yaml:"cmd-touch"` // is the cumulative number of stats commands CmdStats int `json:"cmdStats" yaml:"cmd-stats"` // is the cumulative number of stats-job commands CmdStatsJob int `json:"cmdStatsJob" yaml:"cmd-stats-job"` // is the cumulative number of stats-tube commands CmdStatsTube int `json:"cmdStatsTube" yaml:"cmd-stats-tube"` // is the cumulative number of list-tubes commands CmdListTubes int `json:"cmdListTubes" yaml:"cmd-list-tubes"` // is the cumulative number of list-tube-used commands CmdListTubeUsed int `json:"cmdListTubeUsed" yaml:"cmd-list-tube-used"` // is the cumulative number of list-tubes-watched commands CmdListTubesWatched int `json:"cmdListTubesWatched" yaml:"cmd-list-tubes-watched"` // is the cumulative number of pause-tube command CmdPauseTube int `json:"cmdPauseTube" yaml:"cmd-pause-tube"` // is the cumulative count of times a job has timed out JobTimeouts int `json:"jobTimeouts" yaml:"job-timeouts"` // is the cumulative count of jobs created TotalJobs int `json:"totalJobs" yaml:"total-jobs"` // is the maximum number of bytes in a job MaxJobSize int `json:"maxJobSize" yaml:"max-job-size"` // is the number of currently-existing tubes CurrentTubes int `json:"currentTubes" yaml:"current-tubes"` // is the number of currently open connections CurrentConnections int `json:"currentConnections" yaml:"current-connections"` // is the number of open connections that have each issued at least one put command CurrentProducers int `json:"currentProducers" yaml:"current-producers"` // is the number of open connections that have each issued at least one reserve command CurrentWorkers int `json:"currentWorkers" yaml:"current-workers"` // is the number of open connections that have issued a reserve command but not yet received a response CurrentWaiting int `json:"currentWaiting" yaml:"current-waiting"` // is the cumulative count of connections TotalConnections int `json:"totalConnections" yaml:"total-connections"` // is the process id of the server PID int `json:"pid" yaml:"pid"` // is the version string of the server Version string `json:"version" yaml:"version"` // is the cumulative user CPU time of this process in seconds and microseconds RUsageUTime float64 `json:"rUsageUTime" yaml:"rusage-utime"` // is the cumulative system CPU time of this process in seconds and microseconds RUsageSTime float64 `json:"rUsageSTime" yaml:"rusage-stime"` // is the number of seconds since this server process started running Uptime int `json:"uptime" yaml:"uptime"` // is the index of the oldest binlog file needed to store the current jobs BinlogOldestIndex int `json:"binlogOldestIndex" yaml:"binlog-oldest-index"` // is the index of the current binlog file being written to. If binlog is not active this value will be 0 BinlogCurrentIndex int `json:"binlogCurrentIndex" yaml:"binlog-current-index"` // is the maximum size in bytes a binlog file is allowed to get before a new binlog file is opened BinlogMaxSize int `json:"binlogMaxSize" yaml:"binlog-max-size"` // is the cumulative number of records written to the binlog BinlogRecordsWritten int `json:"binlogRecordsWritten" yaml:"binlog-records-written"` // is the cumulative number of records written as part of compaction BinlogRecordsMigrated int `json:"binlogRecordsMigrated" yaml:"binlog-records-migrated"` // is set to "true" if the server is in drain mode, "false" otherwise Draining bool `json:"draining" yaml:"draining"` // is a random id string for this server process, generated every time beanstalkd process starts ID string `json:"id" yaml:"id"` // is the hostname of the machine as determined by uname Hostname string `json:"hostname" yaml:"hostname"` // is the OS version as determined by uname OS string `json:"os" yaml:"os"` // is the machine architecture as determined by uname Platform string `json:"platform" yaml:"platform"` }
type StatsCommand ¶
type StatsCommand struct{}
func (StatsCommand) Body ¶
func (c StatsCommand) Body() []byte
func (StatsCommand) BuildResponse ¶
func (c StatsCommand) BuildResponse(responseLine string, body []byte) (CommandResponse, error)
func (StatsCommand) CommandLine ¶
func (c StatsCommand) CommandLine() string
func (StatsCommand) HasResponseBody ¶
func (c StatsCommand) HasResponseBody() bool
type StatsCommandResponse ¶
type StatsCommandResponse struct {
Data []byte
}
type StatsJob ¶
type StatsJob struct { // is the job id ID int `json:"id" yaml:"id"` // is the name of the tube that contains this job Tube string `json:"tube" yaml:"tube"` // is "ready" or "delayed" or "reserved" or "buried" State string `json:"state" yaml:"state"` // is the priority value set by the put, release, or bury commands Priority int `json:"priority" yaml:"pri"` // is the time in seconds since the put command that created this job Age int `json:"age" yaml:"age"` // is the integer number of seconds to wait before putting this job in the ready queue Delay int `json:"delay" yaml:"delay"` // time to run -- is the integer number of seconds a worker is allowed to run this job TTR int `json:"ttr" yaml:"ttr"` // is the number of seconds left until the server puts this job into the ready queue TimeLeft int `json:"timeLeft" yaml:"time-left"` // is the number of the earliest binlog file containing this job File int `json:"file" yaml:"file"` // is the number of times this job has been reserved Reserves int `json:"reserves" yaml:"reserves"` // is the number of times this job has timed out during a reservation Timeouts int `json:"timeouts" yaml:"timeouts"` // is the number of times a client has released this job from a reservation Releases int `json:"releases" yaml:"releases"` // is the number of times this job has been buried Buries int `json:"buries" yaml:"buries"` // is the number of times this job has been kicked Kicks int `json:"kicks" yaml:"kicks"` }
type StatsJobCommand ¶
type StatsJobCommand struct {
ID int
}
func (StatsJobCommand) Body ¶
func (c StatsJobCommand) Body() []byte
func (StatsJobCommand) BuildResponse ¶
func (c StatsJobCommand) BuildResponse(responseLine string, body []byte) (CommandResponse, error)
func (StatsJobCommand) CommandLine ¶
func (c StatsJobCommand) CommandLine() string
func (StatsJobCommand) HasResponseBody ¶
func (c StatsJobCommand) HasResponseBody() bool
type StatsJobCommandResponse ¶
type StatsJobCommandResponse struct {
Data []byte
}
type StatsTube ¶
type StatsTube struct { // is the tube's name Name string `json:"name" yaml:"name"` // is the number of ready jobs with priority < 1024 CurrentJobsUrgent int `json:"currentJobsUrgent" yaml:"current-jobs-urgent"` // is the number of jobs in the ready queue in this tube CurrentJobsReady int `json:"currentJobsReady" yaml:"current-jobs-ready"` // is the number of jobs reserved by all clients in this tube CurrentJobsReserved int `json:"currentJobsReserved" yaml:"current-jobs-reserved"` // is the number of delayed jobs in this tube CurrentJobsDelayed int `json:"currentJobsDelayed" yaml:"current-jobs-delayed"` // is the number of buried jobs in this tube CurrentJobsBuried int `json:"currentJobsBuried" yaml:"current-jobs-buried"` // is the cumulative count of jobs created in this tube in the current beanstalkd process TotalJobs int `json:"totalJobs" yaml:"total-jobs"` // is the number of open connections that are currently using this tube CurrentUsing int `json:"currentUsing" yaml:"current-using"` // is the number of open connections that have issued a reserve command while watching this tube but not yet received a response CurrentWaiting int `json:"currentWaiting" yaml:"current-waiting"` // is the number of open connections that are currently watching this tube CurrentWatching int `json:"currentWatching" yaml:"current-watching"` // is the number of seconds the tube has been paused for Pause int `json:"pause" yaml:"pause"` // is the cumulative number of delete commands for this tube CmdDelete int `json:"cmdDelete" yaml:"cmd-delete"` // is the cumulative number of pause-tube commands for this tube CmdPauseTube int `json:"cmdPauseTube" yaml:"cmd-pause-tube"` // is the number of seconds until the tube is un-paused PauseTimeLeft int `json:"pauseTimeLeft" yaml:"pause-time-left"` }
type StatsTubeCommand ¶
type StatsTubeCommand struct {
Tube string
}
func (StatsTubeCommand) Body ¶
func (c StatsTubeCommand) Body() []byte
func (StatsTubeCommand) BuildResponse ¶
func (c StatsTubeCommand) BuildResponse(responseLine string, body []byte) (CommandResponse, error)
func (StatsTubeCommand) CommandLine ¶
func (c StatsTubeCommand) CommandLine() string
func (StatsTubeCommand) HasResponseBody ¶
func (c StatsTubeCommand) HasResponseBody() bool
type StatsTubeCommandResponse ¶
type StatsTubeCommandResponse struct {
Data []byte
}
type TouchCommand ¶
type TouchCommand struct {
ID int
}
func (TouchCommand) Body ¶
func (c TouchCommand) Body() []byte
func (TouchCommand) BuildResponse ¶
func (c TouchCommand) BuildResponse(responseLine string, _ []byte) (CommandResponse, error)
func (TouchCommand) CommandLine ¶
func (c TouchCommand) CommandLine() string
func (TouchCommand) HasResponseBody ¶
func (c TouchCommand) HasResponseBody() bool
type TouchCommandResponse ¶
type TouchCommandResponse struct{}
type UseCommand ¶
type UseCommand struct {
Tube string
}
func (UseCommand) Body ¶
func (c UseCommand) Body() []byte
func (UseCommand) BuildResponse ¶
func (c UseCommand) BuildResponse(responseLine string, _ []byte) (CommandResponse, error)
func (UseCommand) CommandLine ¶
func (c UseCommand) CommandLine() string
func (UseCommand) HasResponseBody ¶
func (c UseCommand) HasResponseBody() bool
type UseCommandResponse ¶
type UseCommandResponse struct {
Tube string
}
type WatchCommand ¶
type WatchCommand struct {
Tube string
}
func (WatchCommand) Body ¶
func (c WatchCommand) Body() []byte
func (WatchCommand) BuildResponse ¶
func (c WatchCommand) BuildResponse(responseLine string, _ []byte) (CommandResponse, error)
func (WatchCommand) CommandLine ¶
func (c WatchCommand) CommandLine() string
func (WatchCommand) HasResponseBody ¶
func (c WatchCommand) HasResponseBody() bool
type WatchCommandResponse ¶
type WatchCommandResponse struct {
Count int
}
Source Files ¶
- client.go
- command.go
- command_bury.go
- command_delete.go
- command_ignore.go
- command_kick.go
- command_kick_job.go
- command_list_tube_used.go
- command_list_tubes.go
- command_list_tubes_watched.go
- command_pause_tube.go
- command_peek.go
- command_peek_buried.go
- command_peek_delayed.go
- command_peek_ready.go
- command_put.go
- command_release.go
- command_reserve.go
- command_reserve_job.go
- command_reserve_with_timeout.go
- command_stats.go
- command_stats_job.go
- command_stats_tube.go
- command_touch.go
- command_use.go
- command_watch.go
- errors.go
- logger.go
- models.go
- pool.go
Click to show internal directories.
Click to hide internal directories.