registry

package
v0.0.0-...-60dd4b1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2015 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMachines  = "http://172.17.8.101:4001"
	DefaultKeyPrefix = "/risu/"
)
View Source
const (
	DefaultExpireSeconds = 60 * 60 * 24 * 5 // 5 days
)
View Source
const DefaultFileDir = "/etc/risu/"

DefaultFileDir is default file dir

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdRegistry

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

func (*EtcdRegistry) Create

func (r *EtcdRegistry) Create(opts schema.BuildCreateOpts) (schema.Build, error)

func (*EtcdRegistry) Get

func (r *EtcdRegistry) Get(id uuid.UUID) (schema.Build, error)

func (*EtcdRegistry) List

func (r *EtcdRegistry) List() ([]schema.Build, error)

func (*EtcdRegistry) Set

func (r *EtcdRegistry) Set(build schema.Build, opts schema.BuildUpdateOpts) error

type LocalFsRegistry

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

LocalFsRegistry is sharing dir

func (*LocalFsRegistry) Create

func (*LocalFsRegistry) Get

func (r *LocalFsRegistry) Get(id uuid.UUID) (schema.Build, error)

Get get build data

func (*LocalFsRegistry) List

func (r *LocalFsRegistry) List() ([]schema.Build, error)

func (*LocalFsRegistry) Set

Set stores the build data to a json file. file name is "/tmp/risu/<UUID>.json".

type Registry

type Registry interface {
	Create(opts schema.BuildCreateOpts) (schema.Build, error)
	Set(build schema.Build, opts schema.BuildUpdateOpts) error
	Get(id uuid.UUID) (schema.Build, error)
	List() ([]schema.Build, error)
}

func NewEtcdRegistry

func NewEtcdRegistry(machines string) Registry

func NewLocalFsRegistry

func NewLocalFsRegistry(dir string) Registry

NewLocalFsRegistry is init

func NewRegistry

func NewRegistry(backend string, endpoint string) Registry

Jump to

Keyboard shortcuts

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