Documentation ¶
Index ¶
- Constants
- func Backoff(maxDuration time.Duration, timeoutMessage string, f func() (bool, error)) error
- func Init(root string, config map[string]string) (convoydriver.ConvoyDriver, error)
- func WaitEnvironment(client *rancherClient.RancherClient, env *rancherClient.Environment) error
- func WaitFor(client *rancherClient.RancherClient, resource *rancherClient.Resource, ...) error
- func WaitService(client *rancherClient.RancherClient, service *rancherClient.Service) error
- type Device
- type Driver
- func (d *Driver) BackupOps() (convoydriver.BackupOperations, error)
- func (d *Driver) CreateVolume(id string, opts map[string]string) error
- func (d *Driver) DeleteVolume(id string, opts map[string]string) error
- func (d *Driver) GetVolumeInfo(id string) (map[string]string, error)
- func (d *Driver) Info() (map[string]string, error)
- func (d *Driver) ListVolume(opts map[string]string) (map[string]map[string]string, error)
- func (d *Driver) MountPoint(id string) (string, error)
- func (d *Driver) MountVolume(id string, opts map[string]string) (string, error)
- func (d *Driver) Name() string
- func (d *Driver) SnapshotOps() (convoydriver.SnapshotOperations, error)
- func (d *Driver) UmountVolume(id string) error
- func (d *Driver) VolumeOps() (convoydriver.VolumeOperations, error)
- type Stack
- type Volume
Constants ¶
View Source
const ( DRIVER_NAME = "longhorn" DRIVER_CONFIG_FILE = "longhorn.cfg" MOUNTS_DIR = "mounts" DEV_DIR = "/dev/longhorn/%s" VOLUME_CFG_PREFIX = "volume_" LONGHORN_CFG_PREFIX = DRIVER_NAME + "_" CFG_POSTFIX = ".json" SNAPSHOT_PATH = "snapshots" DEFAULT_VOLUME_SIZE = "10G" RANCHER_METADATA_URL = "http://rancher-metadata/2015-12-19" LH_RANCHER_URL = "lh.rancherurl" LH_RANCHER_ACCESS_KEY = "lh.rancheraccesskey" LH_RANCHER_SECRET_KEY = "lh.ranchersecretkey" LH_DEFAULT_VOLUME_SIZE = "lh.defaultvolumesize" LH_CONTAINER_NAME = "lh.containername" COMPOSE_VOLUME_NAME = "VOLUME_NAME" COMPOSE_VOLUME_SIZE = "VOLUME_SIZE" COMPOSE_SLAB_SIZE = "SLAB_SIZE" COMPOSE_CONVOY = "CONVOY_CONTAINER" AFFINITY_LABEL = "io.rancher.scheduler.affinity:container" )
View Source
const ( RETRY_INTERVAL = 2 * time.Second RETRY_MAX = 200 )
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(root string, config map[string]string) (convoydriver.ConvoyDriver, error)
func WaitEnvironment ¶
func WaitEnvironment(client *rancherClient.RancherClient, env *rancherClient.Environment) error
func WaitFor ¶
func WaitFor(client *rancherClient.RancherClient, resource *rancherClient.Resource, output interface{}, transitioning func() string) error
func WaitService ¶
func WaitService(client *rancherClient.RancherClient, service *rancherClient.Service) error
Types ¶
type Device ¶
type Device struct { Root string DefaultVolumeSize int64 RancherURL string RancherAccessKey string RancherSecretKey string }
func (*Device) ConfigFile ¶
type Driver ¶
type Driver struct { Device // contains filtered or unexported fields }
func (*Driver) BackupOps ¶
func (d *Driver) BackupOps() (convoydriver.BackupOperations, error)
func (*Driver) CreateVolume ¶
func (*Driver) DeleteVolume ¶
func (*Driver) ListVolume ¶
func (*Driver) MountVolume ¶
func (*Driver) SnapshotOps ¶
func (d *Driver) SnapshotOps() (convoydriver.SnapshotOperations, error)
func (*Driver) UmountVolume ¶
func (*Driver) VolumeOps ¶
func (d *Driver) VolumeOps() (convoydriver.VolumeOperations, error)
type Stack ¶
type Stack struct { Client *rancherClient.RancherClient ExternalId string Name string Environment map[string]interface{} Template string ContainerName string }
func (*Stack) Create ¶
func (s *Stack) Create() (*rancherClient.Environment, error)
func (*Stack) Find ¶
func (s *Stack) Find() (*rancherClient.Environment, error)
func (*Stack) MoveController ¶
type Volume ¶
type Volume struct { UUID string Size int64 Name string MountPoint string PrepareForVM bool // contains filtered or unexported fields }
func (*Volume) ConfigFile ¶
func (*Volume) GenerateDefaultMountPoint ¶
func (*Volume) GetMountOpts ¶
Click to show internal directories.
Click to hide internal directories.