migration

package
v0.0.0-...-addb04b Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2015 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CRIUType_name = map[int32]string{
	0: "CRIU_RSYNC",
	1: "PHAUL",
}
View Source
var CRIUType_value = map[string]int32{
	"CRIU_RSYNC": 0,
	"PHAUL":      1,
}
View Source
var MigrationFSType_name = map[int32]string{
	0: "RSYNC",
	1: "BTRFS",
}
View Source
var MigrationFSType_value = map[string]int32{
	"RSYNC": 0,
	"BTRFS": 1,
}

Functions

func AddSlash

func AddSlash(path string) string

AddSlash adds a slash to the end of paths if they don't already have one. This can be useful for rsyncing things, since rsync has behavior present on the presence or absence of a trailing slash.

func NewMigrationSink

func NewMigrationSink(args *MigrationSinkArgs) (func() error, error)

func NewMigrationSource

func NewMigrationSource(c *lxc.Container) (shared.OperationWebsocket, error)

func RsyncRecv

func RsyncRecv(path string, conn *websocket.Conn) error

RsyncRecv sets up the receiving half of the websocket to rsync (the other half set up by RsyncSend), putting the contents in the directory specified by path.

func RsyncSend

func RsyncSend(path string, conn *websocket.Conn) error

RsyncSend sets up the sending half of an rsync, to recursively send the directory pointed to by path over the websocket.

Types

type CRIUType

type CRIUType int32
const (
	CRIUType_CRIU_RSYNC CRIUType = 0
	CRIUType_PHAUL      CRIUType = 1
)

func (CRIUType) Enum

func (x CRIUType) Enum() *CRIUType

func (CRIUType) MarshalJSON

func (x CRIUType) MarshalJSON() ([]byte, error)

func (CRIUType) String

func (x CRIUType) String() string

func (*CRIUType) UnmarshalJSON

func (x *CRIUType) UnmarshalJSON(data []byte) error

type MigrationControl

type MigrationControl struct {
	Success *bool `protobuf:"varint,1,req,name=success" json:"success,omitempty"`
	// optional failure message if sending a failure
	Message          *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*MigrationControl) GetMessage

func (m *MigrationControl) GetMessage() string

func (*MigrationControl) GetSuccess

func (m *MigrationControl) GetSuccess() bool

func (*MigrationControl) ProtoMessage

func (*MigrationControl) ProtoMessage()

func (*MigrationControl) Reset

func (m *MigrationControl) Reset()

func (*MigrationControl) String

func (m *MigrationControl) String() string

type MigrationFSType

type MigrationFSType int32
const (
	MigrationFSType_RSYNC MigrationFSType = 0
	MigrationFSType_BTRFS MigrationFSType = 1
)

func (MigrationFSType) Enum

func (x MigrationFSType) Enum() *MigrationFSType

func (MigrationFSType) MarshalJSON

func (x MigrationFSType) MarshalJSON() ([]byte, error)

func (MigrationFSType) String

func (x MigrationFSType) String() string

func (*MigrationFSType) UnmarshalJSON

func (x *MigrationFSType) UnmarshalJSON(data []byte) error

type MigrationHeader

type MigrationHeader struct {
	Fs               *MigrationFSType `protobuf:"varint,1,req,name=fs,enum=migration.MigrationFSType" json:"fs,omitempty"`
	Criu             *CRIUType        `protobuf:"varint,2,opt,name=criu,enum=migration.CRIUType" json:"criu,omitempty"`
	XXX_unrecognized []byte           `json:"-"`
}

func (*MigrationHeader) GetCriu

func (m *MigrationHeader) GetCriu() CRIUType

func (*MigrationHeader) GetFs

func (m *MigrationHeader) GetFs() MigrationFSType

func (*MigrationHeader) ProtoMessage

func (*MigrationHeader) ProtoMessage()

func (*MigrationHeader) Reset

func (m *MigrationHeader) Reset()

func (*MigrationHeader) String

func (m *MigrationHeader) String() string

type MigrationSinkArgs

type MigrationSinkArgs struct {
	Url       string
	Dialer    websocket.Dialer
	Container *lxc.Container
	Secrets   map[string]string
	IdMap     *shared.Idmap
}

Jump to

Keyboard shortcuts

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