rancher

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2017 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LB_IMAGE       = "rancher/load-balancer-service"
	DNS_IMAGE      = "rancher/dns-service"
	EXTERNAL_IMAGE = "rancher/external-service"

	RancherType         = ServiceType(iota)
	LegacyLbServiceType = ServiceType(iota)
	LbServiceType       = ServiceType(iota)
	DnsServiceType      = ServiceType(iota)
	ExternalServiceType = ServiceType(iota)
	StorageDriverType   = ServiceType(iota)
	NetworkDriverType   = ServiceType(iota)
)
View Source
const DefaultDockerfileName = "Dockerfile"

Variables

This section is empty.

Functions

func NewProject

func NewProject(context *Context) (*project.Project, error)

func Upload

func Upload(c *Context, name string) (string, string, error)

Types

type CompositeService

type CompositeService struct {
	client.Service

	StorageDriver *client.StorageDriver `json:"storageDriver,omitempty" yaml:"storageDriver,omitempty"`
	NetworkDriver *client.NetworkDriver `json:"networkDriver,omitempty" yaml:"networkDriver,omitempty"`
	RealLbConfig  *client.LbConfig      `json:"lbConfig,omitempty" yaml:"lb_config,omitempty"`

	// External Service Fields
	ExternalIpAddresses []string                    `json:"externalIpAddresses,omitempty" yaml:"external_ip_addresses,omitempty"`
	Hostname            string                      `json:"hostname,omitempty" yaml:"hostname,omitempty"`
	HealthCheck         *client.InstanceHealthCheck `json:"healthCheck,omitempty" yaml:"health_check,omitempty"`
}

type ContainerInspect

type ContainerInspect struct {
	Name       string
	Config     *container.Config
	HostConfig *container.HostConfig
}

type Context

type Context struct {
	project.Context

	Url       string
	AccessKey string
	SecretKey string
	Client    *client.RancherClient
	Stack     *client.Stack

	SidekickInfo *SidekickInfo
	Uploader     Uploader
	PullCached   bool
	Pull         bool
	Args         []string

	Upgrade        bool
	ForceUpgrade   bool
	Rollback       bool
	Interval       int64
	BatchSize      int64
	ConfirmUpgrade bool
	// contains filtered or unexported fields
}

func (*Context) LoadStack

func (c *Context) LoadStack() (*client.Stack, error)

type Dependencies added in v0.14.0

type Dependencies struct {
	Context *Context
	// contains filtered or unexported fields
}

func (*Dependencies) Initialize added in v0.14.0

func (h *Dependencies) Initialize(ctx context.Context) error

type Dependency added in v0.14.0

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

func (*Dependency) EnsureItExists added in v0.14.0

func (d *Dependency) EnsureItExists(ctx context.Context) error

type Factory

type Factory interface {
	Hash(service *RancherService) (digest.ServiceHash, error)
	Create(service *RancherService) error
	Upgrade(r *RancherService, force bool, selected []string) error
	Rollback(r *RancherService) error
}

func GetFactory

func GetFactory(service *RancherService) (Factory, error)

type Host added in v0.14.0

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

func (*Host) EnsureItExists added in v0.14.0

func (h *Host) EnsureItExists(ctx context.Context) error

type Hosts added in v0.14.0

type Hosts struct {
	Context *Context
	// contains filtered or unexported fields
}

func (*Hosts) Initialize added in v0.14.0

func (h *Hosts) Initialize(ctx context.Context) error

type IsDone

type IsDone func(*client.Resource) (bool, error)
type Link struct {
	ServiceName, Alias string
}

type NormalFactory

type NormalFactory struct {
}

func (*NormalFactory) Create

func (f *NormalFactory) Create(r *RancherService) error

func (*NormalFactory) Hash

func (f *NormalFactory) Hash(service *RancherService) (digest.ServiceHash, error)

func (*NormalFactory) Rollback

func (f *NormalFactory) Rollback(r *RancherService) error

func (*NormalFactory) Upgrade

func (f *NormalFactory) Upgrade(r *RancherService, force bool, selected []string) error

type RancherContainer added in v0.14.0

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

func NewContainer added in v0.14.0

func NewContainer(name string, config *config.ServiceConfig, context *Context) *RancherContainer

func (*RancherContainer) Build added in v0.14.0

func (r *RancherContainer) Build(ctx context.Context, buildOptions options.Build) error

func (*RancherContainer) Client added in v0.14.0

func (r *RancherContainer) Client() *client.RancherClient

func (*RancherContainer) Config added in v0.14.0

func (r *RancherContainer) Config() *config.ServiceConfig

func (*RancherContainer) Context added in v0.14.0

func (r *RancherContainer) Context() *Context

func (*RancherContainer) Create added in v0.14.0

func (r *RancherContainer) Create(ctx context.Context, options options.Create) error

func (*RancherContainer) DependentServices added in v0.14.0

func (r *RancherContainer) DependentServices() []project.ServiceRelationship

func (*RancherContainer) Log added in v0.14.0

func (r *RancherContainer) Log(ctx context.Context, follow bool) error

func (*RancherContainer) Name added in v0.14.0

func (r *RancherContainer) Name() string

func (*RancherContainer) Pull added in v0.14.0

func (r *RancherContainer) Pull(ctx context.Context) error

func (*RancherContainer) Up added in v0.14.0

func (r *RancherContainer) Up(ctx context.Context, options options.Up) error

type RancherContainerFactory added in v0.14.0

type RancherContainerFactory struct {
	Context *Context
}

func (*RancherContainerFactory) Create added in v0.14.0

func (r *RancherContainerFactory) Create(project *project.Project, name string, serviceConfig *config.ServiceConfig) (project.Service, error)

type RancherDependenciesFactory added in v0.14.0

type RancherDependenciesFactory struct {
	Context *Context
}

func (*RancherDependenciesFactory) Create added in v0.14.0

func (f *RancherDependenciesFactory) Create(projectName string, dependencyConfigs map[string]*config.DependencyConfig) (project.Dependencies, error)

type RancherHostsFactory added in v0.14.0

type RancherHostsFactory struct {
	Context *Context
}

func (*RancherHostsFactory) Create added in v0.14.0

func (f *RancherHostsFactory) Create(projectName string, hostConfigs map[string]*config.HostConfig) (project.Hosts, error)

type RancherSecretsFactory added in v0.14.0

type RancherSecretsFactory struct {
	Context *Context
}

func (*RancherSecretsFactory) Create added in v0.14.0

func (f *RancherSecretsFactory) Create(projectName string, secretConfigs map[string]*config.SecretConfig) (project.Secrets, error)

type RancherService

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

func NewService

func NewService(name string, config *config.ServiceConfig, context *Context) *RancherService

func (*RancherService) Build

func (r *RancherService) Build(ctx context.Context, buildOptions options.Build) error

func (*RancherService) Client

func (r *RancherService) Client() *client.RancherClient

func (*RancherService) Config

func (r *RancherService) Config() *config.ServiceConfig

func (*RancherService) Context

func (r *RancherService) Context() *Context

func (*RancherService) Create

func (r *RancherService) Create(ctx context.Context, options options.Create) error

func (*RancherService) DependentServices

func (r *RancherService) DependentServices() []project.ServiceRelationship

func (*RancherService) FindExisting

func (r *RancherService) FindExisting(name string) (*client.Service, error)

func (*RancherService) HealthCheck

func (r *RancherService) HealthCheck(service string) *client.InstanceHealthCheck

func (*RancherService) Log

func (r *RancherService) Log(ctx context.Context, follow bool) error

func (*RancherService) Metadata

func (r *RancherService) Metadata() map[string]interface{}

func (*RancherService) Name

func (r *RancherService) Name() string

func (*RancherService) Pull

func (r *RancherService) Pull(ctx context.Context) (err error)

func (*RancherService) RancherService

func (r *RancherService) RancherService() (*client.Service, error)

func (*RancherService) SelectorContainer

func (r *RancherService) SelectorContainer() string
func (r *RancherService) SelectorLink() string

func (*RancherService) Up

func (r *RancherService) Up(ctx context.Context, options options.Up) error

func (*RancherService) Wait

func (r *RancherService) Wait(service *client.Service) error

func (*RancherService) WaitFor

func (r *RancherService) WaitFor(resource *client.Resource, output interface{}, transitioning func() string) error

type RancherServiceFactory

type RancherServiceFactory struct {
	Context *Context
}

func (*RancherServiceFactory) Create

func (r *RancherServiceFactory) Create(project *project.Project, name string, serviceConfig *config.ServiceConfig) (project.Service, error)

type RancherVolumesFactory

type RancherVolumesFactory struct {
	Context *Context
}

func (*RancherVolumesFactory) Create

func (f *RancherVolumesFactory) Create(projectName string, volumeConfigs map[string]*config.VolumeConfig, serviceConfigs *config.ServiceConfigs) (project.Volumes, error)

type S3Uploader

type S3Uploader struct {
}

func (*S3Uploader) Name

func (s *S3Uploader) Name() string

func (*S3Uploader) Upload

func (s *S3Uploader) Upload(p *project.Project, name string, reader io.ReadSeeker, hash string) (string, string, error)

type Secret added in v0.14.0

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

func (*Secret) EnsureItExists added in v0.14.0

func (s *Secret) EnsureItExists(ctx context.Context) error

type Secrets added in v0.14.0

type Secrets struct {
	Context *Context
	// contains filtered or unexported fields
}

func (*Secrets) Initialize added in v0.14.0

func (s *Secrets) Initialize(ctx context.Context) error

type ServiceType

type ServiceType int

func FindServiceType

func FindServiceType(r *RancherService) ServiceType

type Sidekick

type Sidekick struct {
	project.EmptyService
	// contains filtered or unexported fields
}

func NewSidekick

func NewSidekick(name string, serviceConfig *config.ServiceConfig, context *Context) *Sidekick

func (*Sidekick) Config

func (s *Sidekick) Config() *config.ServiceConfig

func (*Sidekick) DependentServices

func (s *Sidekick) DependentServices() []project.ServiceRelationship

func (*Sidekick) Log

func (s *Sidekick) Log(ctx context.Context, follow bool) error

func (*Sidekick) Name

func (s *Sidekick) Name() string

type SidekickInfo

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

func NewSidekickInfo

func NewSidekickInfo(project *project.Project) *SidekickInfo

type Uploader

type Uploader interface {
	Upload(p *project.Project, name string, reader io.ReadSeeker, hash string) (string, string, error)
	Name() string
}

type Volume

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

func NewVolume

func NewVolume(projectName, name string, config *config.VolumeConfig, context *Context) *Volume

func (*Volume) EnsureItExists

func (v *Volume) EnsureItExists(ctx context.Context) error

func (*Volume) Inspect added in v0.14.2

func (v *Volume) Inspect(ctx context.Context) (*client.VolumeTemplate, error)

Inspect looks up a volume template

func (*Volume) Remove

func (v *Volume) Remove(ctx context.Context) error

type Volumes

type Volumes struct {
	Context *Context
	// contains filtered or unexported fields
}

func (*Volumes) Initialize

func (v *Volumes) Initialize(ctx context.Context) error

func (*Volumes) Remove

func (v *Volumes) Remove(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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