Documentation ¶
Index ¶
Constants ¶
const ( DefaultMaxRetries = 7 DefaultMaxConcurrency = 32767 )
Default values
const ( SuccessRequest = requestCode(iota) ErrorRequest RequeueRequest FatalRequest StatusRequest InfoRequest SetDeadlineRequest RequeueActiveRequest RequeueSucceededRequest RequeueFailedRequest )
request codes
Variables ¶
var ( ErrNilClient = errors.New("uninitialised client") ErrInternal = errors.New("fatal internal error") )
errors
Functions ¶
Types ¶
type Config ¶
type Config struct { MaxRetries int // the maximum number of times an entry can be retried MaxConcurrency int // the maximum number of simultaneously active entries in a range Log log.Interface // the logger }
Config describes the configuration options we allow a user to set on an inmem instance.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a new client configuration initialised with the default values.
func SetDefaultConfig ¶
SetDefaultConfig sets the default configuration to c and returns the old default configuration. This change will be reflected in future calls to DefaultConfig.
type Entry ¶
type Entry struct {
// contains filtered or unexported fields
}
Entry holds metadata about an active entry in a range.
type Info ¶
type Info struct {
// contains filtered or unexported fields
}
Info describes an entry in a range.
func (*Info) AppName ¶
AppName returns the application name provided by the client to which this entry was assigned, or the empty string if there is no such client.
func (*Info) Deadline ¶
Deadline returns the time at which this entry will go stale, or the zero time if this entry has not been assigned to a client.
func (*Info) Hostname ¶
Hostname returns the hostname provided by the client to which this entry was assigned, or the empty string if there is no such client.