bbs

package
v0.0.0-...-aa06bc0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2014 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ClaimTTL = 10 * time.Second
View Source
const ExecutorSchemaRoot = SchemaRoot + "executor"
View Source
const FileServerSchemaRoot = SchemaRoot + "file_server"
View Source
const RunOnceSchemaRoot = SchemaRoot + "run_once"
View Source
const SchemaRoot = "/v1/"

Variables

This section is empty.

Functions

This section is empty.

Types

type BBS

type BBS struct {
	ExecutorBBS
	StagerBBS
	FileServerBBS
	// contains filtered or unexported fields
}

func New

func New(store storeadapter.StoreAdapter) *BBS

func (*BBS) GetAllClaimedRunOnces

func (self *BBS) GetAllClaimedRunOnces() ([]models.RunOnce, error)

func (*BBS) GetAllCompletedRunOnces

func (self *BBS) GetAllCompletedRunOnces() ([]models.RunOnce, error)

func (*BBS) GetAllExecutors

func (self *BBS) GetAllExecutors() ([]string, error)

func (*BBS) GetAllPendingRunOnces

func (self *BBS) GetAllPendingRunOnces() ([]models.RunOnce, error)

func (*BBS) GetAllStartingRunOnces

func (self *BBS) GetAllStartingRunOnces() ([]models.RunOnce, error)

type ExecutorBBS

type ExecutorBBS interface {
	MaintainExecutorPresence(
		heartbeatInterval time.Duration,
		executorID string,
	) (presence PresenceInterface, disappeared <-chan bool, err error)

	WatchForDesiredRunOnce() (<-chan models.RunOnce, chan<- bool, <-chan error)

	ClaimRunOnce(models.RunOnce) error
	StartRunOnce(models.RunOnce) error
	CompleteRunOnce(models.RunOnce) error

	ConvergeRunOnce(timeToClaim time.Duration)
	MaintainConvergeLock(interval time.Duration, executorID string) (disappeared <-chan bool, stop chan<- chan bool, err error)
}

type FileServerBBS

type FileServerBBS interface {
	MaintainFileServerPresence(
		heartbeatInterval time.Duration,
		fileServerURL string,
		fileServerId string,
	) (presence PresenceInterface, disappeared <-chan bool, err error)
}

type Presence

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

func NewPresence

func NewPresence(store storeadapter.StoreAdapter, key string, value []byte) *Presence

func (*Presence) Maintain

func (p *Presence) Maintain(interval time.Duration) (<-chan bool, error)

func (*Presence) Remove

func (p *Presence) Remove()

type PresenceInterface

type PresenceInterface interface {
	Remove()
}

type StagerBBS

type StagerBBS interface {
	WatchForCompletedRunOnce() (<-chan models.RunOnce, chan<- bool, <-chan error)

	DesireRunOnce(models.RunOnce) error
	ResolveRunOnce(models.RunOnce) error

	GetAvailableFileServer() (string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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