redisprovisioner

package
v0.0.0-...-2d4f00f Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	TTL         time.Duration
	Lock        string
	RedisPool   *redis.Pool
	RedisPrefix string
}

type Provisioner

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

func New

func New(opt *Options) (*Provisioner, error)

func (*Provisioner) Check

func (p *Provisioner) Check(shardID string) (string, error)

func (*Provisioner) Heartbeat

func (p *Provisioner) Heartbeat(shardID string) error

func (*Provisioner) Release

func (p *Provisioner) Release(shardID string) error

func (*Provisioner) TTL

func (p *Provisioner) TTL() time.Duration

func (*Provisioner) TryAcquire

func (p *Provisioner) TryAcquire(shardID string) error

Jump to

Keyboard shortcuts

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