checkpointcollector

package
v0.0.0-...-53746d6 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConvertType receivetype = "convert"
	Migration   receivetype = "migration"
)

Variables

View Source
var File_generated_proto protoreflect.FileDescriptor
View Source
var OldPeriod int64

Functions

func NewDockerClient

func NewDockerClient() *client.Client

func NewEventClient

func NewEventClient() *v1core.CoreV1Client

func NewKetiClient

func NewKetiClient() keticlient.KetiV1Interface

func NewKubeClient

func NewKubeClient() clientset.Interface

func RegisterCheckpointPeriodServer

func RegisterCheckpointPeriodServer(s *grpc.Server, srv CheckpointPeriodServer)

Types

type CheckpointCollector

type CheckpointCollector struct {
	Cnumber      int
	Pods         map[string]map[string]string
	DispatchList map[string]string
	DockerClient *client.Client
	KubeClient   clientset.Interface
	KetiClient   keticlient.KetiV1Interface
	Period       int64
	UpdateChan   chan cptypes.ContainerUpdate
	DoneChan     chan int
	Connection   *LogConnection
	Recorder     record.EventRecorder
	EventClient  v1core.EventsGetter
}

func NewCheckpointCollector

func NewCheckpointCollector() *CheckpointCollector

func (*CheckpointCollector) CheckpointCreate

func (c *CheckpointCollector) CheckpointCreate(ctx context.Context, in *CreateCheckpoint) (*PodReturnValue, error)

func (*CheckpointCollector) ContainerSync

func (c *CheckpointCollector) ContainerSync()

func (*CheckpointCollector) ConvertPod

func (c *CheckpointCollector) ConvertPod(ctx context.Context, in *Convert) (*Empty, error)

func (*CheckpointCollector) ConvertPodToMigPod

func (c *CheckpointCollector) ConvertPodToMigPod(containers map[string]string)

func (*CheckpointCollector) CreateDocker

func (*CheckpointCollector) DetachWork

func (c *CheckpointCollector) DetachWork(pod *ketiv1.Pod)

func (*CheckpointCollector) DispatchWork

func (c *CheckpointCollector) DispatchWork(pod *ketiv1.Pod)

func (*CheckpointCollector) ExecPod

func (*CheckpointCollector) HandleADD

func (c *CheckpointCollector) HandleADD(pods []*ketiv1.Pod)

func (*CheckpointCollector) HandleCheckPoint

func (c *CheckpointCollector) HandleCheckPoint(podname resource)

func (*CheckpointCollector) HandleCheckPointAll

func (c *CheckpointCollector) HandleCheckPointAll(pods map[string]map[string]string)

func (*CheckpointCollector) HandleRemove

func (c *CheckpointCollector) HandleRemove(pods []*ketiv1.Pod)

func (*CheckpointCollector) LogPod

func (*CheckpointCollector) NewContainerLister

func (c *CheckpointCollector) NewContainerLister()

func (*CheckpointCollector) Run

func (c *CheckpointCollector) Run()

func (*CheckpointCollector) SetCheckpointPeriod

func (c *CheckpointCollector) SetCheckpointPeriod(ctx context.Context, in *InputValue) (*ReturnValue, error)

type CheckpointPeriodClient

type CheckpointPeriodClient interface {
	SetCheckpointPeriod(ctx context.Context, in *InputValue, opts ...grpc.CallOption) (*ReturnValue, error)
	CheckpointCreate(ctx context.Context, in *CreateCheckpoint, opts ...grpc.CallOption) (*PodReturnValue, error)
	ConvertPod(ctx context.Context, in *Convert, opts ...grpc.CallOption) (*Empty, error)
	CreateDocker(ctx context.Context, in *Connect, opts ...grpc.CallOption) (CheckpointPeriod_CreateDockerClient, error)
	LogPod(ctx context.Context, in *LogValue, opts ...grpc.CallOption) (*LogReturnValue, error)
	ExecPod(ctx context.Context, in *ExecValue, opts ...grpc.CallOption) (CheckpointPeriod_ExecPodClient, error)
}

CheckpointPeriodClient is the client API for CheckpointPeriod service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type CheckpointPeriodServer

type CheckpointPeriodServer interface {
	SetCheckpointPeriod(context.Context, *InputValue) (*ReturnValue, error)
	CheckpointCreate(context.Context, *CreateCheckpoint) (*PodReturnValue, error)
	ConvertPod(context.Context, *Convert) (*Empty, error)
	CreateDocker(*Connect, CheckpointPeriod_CreateDockerServer) error
	LogPod(context.Context, *LogValue) (*LogReturnValue, error)
	ExecPod(*ExecValue, CheckpointPeriod_ExecPodServer) error
}

CheckpointPeriodServer is the server API for CheckpointPeriod service.

type CheckpointPeriod_CreateDockerClient

type CheckpointPeriod_CreateDockerClient interface {
	Recv() (*LogValue, error)
	grpc.ClientStream
}

type CheckpointPeriod_CreateDockerServer

type CheckpointPeriod_CreateDockerServer interface {
	Send(*LogValue) error
	grpc.ServerStream
}

type CheckpointPeriod_ExecPodClient

type CheckpointPeriod_ExecPodClient interface {
	Recv() (*ExecReturnValue, error)
	grpc.ClientStream
}

type CheckpointPeriod_ExecPodServer

type CheckpointPeriod_ExecPodServer interface {
	Send(*ExecReturnValue) error
	grpc.ServerStream
}

type Connect

type Connect struct {
	ContainerID string `protobuf:"bytes,1,opt,name=ContainerID,proto3" json:"ContainerID,omitempty"`
	// contains filtered or unexported fields
}

func (*Connect) Descriptor deprecated

func (*Connect) Descriptor() ([]byte, []int)

Deprecated: Use Connect.ProtoReflect.Descriptor instead.

func (*Connect) GetContainerID

func (x *Connect) GetContainerID() string

func (*Connect) ProtoMessage

func (*Connect) ProtoMessage()

func (*Connect) ProtoReflect

func (x *Connect) ProtoReflect() protoreflect.Message

func (*Connect) Reset

func (x *Connect) Reset()

func (*Connect) String

func (x *Connect) String() string

type Convert

type Convert struct {
	Container map[string]string `` /* 159-byte string literal not displayed */
	Err       string            `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
	// contains filtered or unexported fields
}

func (*Convert) Descriptor deprecated

func (*Convert) Descriptor() ([]byte, []int)

Deprecated: Use Convert.ProtoReflect.Descriptor instead.

func (*Convert) GetContainer

func (x *Convert) GetContainer() map[string]string

func (*Convert) GetErr

func (x *Convert) GetErr() string

func (*Convert) ProtoMessage

func (*Convert) ProtoMessage()

func (*Convert) ProtoReflect

func (x *Convert) ProtoReflect() protoreflect.Message

func (*Convert) Reset

func (x *Convert) Reset()

func (*Convert) String

func (x *Convert) String() string

type CreateCheckpoint

type CreateCheckpoint struct {
	PodName string `protobuf:"bytes,1,opt,name=PodName,proto3" json:"PodName,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateCheckpoint) Descriptor deprecated

func (*CreateCheckpoint) Descriptor() ([]byte, []int)

Deprecated: Use CreateCheckpoint.ProtoReflect.Descriptor instead.

func (*CreateCheckpoint) GetPodName

func (x *CreateCheckpoint) GetPodName() string

func (*CreateCheckpoint) ProtoMessage

func (*CreateCheckpoint) ProtoMessage()

func (*CreateCheckpoint) ProtoReflect

func (x *CreateCheckpoint) ProtoReflect() protoreflect.Message

func (*CreateCheckpoint) Reset

func (x *CreateCheckpoint) Reset()

func (*CreateCheckpoint) String

func (x *CreateCheckpoint) String() string

type Empty

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

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type ExecReturnValue

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

func (*ExecReturnValue) Descriptor deprecated

func (*ExecReturnValue) Descriptor() ([]byte, []int)

Deprecated: Use ExecReturnValue.ProtoReflect.Descriptor instead.

func (*ExecReturnValue) ProtoMessage

func (*ExecReturnValue) ProtoMessage()

func (*ExecReturnValue) ProtoReflect

func (x *ExecReturnValue) ProtoReflect() protoreflect.Message

func (*ExecReturnValue) Reset

func (x *ExecReturnValue) Reset()

func (*ExecReturnValue) String

func (x *ExecReturnValue) String() string

type ExecValue

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

func (*ExecValue) Descriptor deprecated

func (*ExecValue) Descriptor() ([]byte, []int)

Deprecated: Use ExecValue.ProtoReflect.Descriptor instead.

func (*ExecValue) ProtoMessage

func (*ExecValue) ProtoMessage()

func (*ExecValue) ProtoReflect

func (x *ExecValue) ProtoReflect() protoreflect.Message

func (*ExecValue) Reset

func (x *ExecValue) Reset()

func (*ExecValue) String

func (x *ExecValue) String() string

type GRPCHandler

type GRPCHandler interface {
	HandleADD(pods []*ketiv1.Pod)
	HandleRemove(pods []*ketiv1.Pod)
	HandleCheckPoint(podname resource)
	HandleCheckPointAll(pods map[string]map[string]string)
}

type InputValue

type InputValue struct {
	Period  int64    `protobuf:"varint,1,opt,name=Period,proto3" json:"Period,omitempty"`
	PodName []string `protobuf:"bytes,2,rep,name=PodName,proto3" json:"PodName,omitempty"`
	// contains filtered or unexported fields
}

func (*InputValue) Descriptor deprecated

func (*InputValue) Descriptor() ([]byte, []int)

Deprecated: Use InputValue.ProtoReflect.Descriptor instead.

func (*InputValue) GetPeriod

func (x *InputValue) GetPeriod() int64

func (*InputValue) GetPodName

func (x *InputValue) GetPodName() []string

func (*InputValue) ProtoMessage

func (*InputValue) ProtoMessage()

func (*InputValue) ProtoReflect

func (x *InputValue) ProtoReflect() protoreflect.Message

func (*InputValue) Reset

func (x *InputValue) Reset()

func (*InputValue) String

func (x *InputValue) String() string

type LogConnection

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

type LogReturnValue

type LogReturnValue struct {
	LogReader string `protobuf:"bytes,1,opt,name=LogReader,proto3" json:"LogReader,omitempty"`
	// contains filtered or unexported fields
}

func (*LogReturnValue) Descriptor deprecated

func (*LogReturnValue) Descriptor() ([]byte, []int)

Deprecated: Use LogReturnValue.ProtoReflect.Descriptor instead.

func (*LogReturnValue) GetLogReader

func (x *LogReturnValue) GetLogReader() string

func (*LogReturnValue) ProtoMessage

func (*LogReturnValue) ProtoMessage()

func (*LogReturnValue) ProtoReflect

func (x *LogReturnValue) ProtoReflect() protoreflect.Message

func (*LogReturnValue) Reset

func (x *LogReturnValue) Reset()

func (*LogReturnValue) String

func (x *LogReturnValue) String() string

type LogValue

type LogValue struct {
	ContainerID string `protobuf:"bytes,1,opt,name=ContainerID,proto3" json:"ContainerID,omitempty"`
	Message     string `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	Timestamps  bool   `protobuf:"varint,3,opt,name=Timestamps,proto3" json:"Timestamps,omitempty"`
	Tail        bool   `protobuf:"varint,4,opt,name=Tail,proto3" json:"Tail,omitempty"`
	// contains filtered or unexported fields
}

func (*LogValue) Descriptor deprecated

func (*LogValue) Descriptor() ([]byte, []int)

Deprecated: Use LogValue.ProtoReflect.Descriptor instead.

func (*LogValue) GetContainerID

func (x *LogValue) GetContainerID() string

func (*LogValue) GetMessage

func (x *LogValue) GetMessage() string

func (*LogValue) GetTail

func (x *LogValue) GetTail() bool

func (*LogValue) GetTimestamps

func (x *LogValue) GetTimestamps() bool

func (*LogValue) ProtoMessage

func (*LogValue) ProtoMessage()

func (*LogValue) ProtoReflect

func (x *LogValue) ProtoReflect() protoreflect.Message

func (*LogValue) Reset

func (x *LogValue) Reset()

func (*LogValue) String

func (x *LogValue) String() string

type PodReturnValue

type PodReturnValue struct {
	CheckpointName string `protobuf:"bytes,1,opt,name=CheckpointName,proto3" json:"CheckpointName,omitempty"`
	Err            string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
	// contains filtered or unexported fields
}

func (*PodReturnValue) Descriptor deprecated

func (*PodReturnValue) Descriptor() ([]byte, []int)

Deprecated: Use PodReturnValue.ProtoReflect.Descriptor instead.

func (*PodReturnValue) GetCheckpointName

func (x *PodReturnValue) GetCheckpointName() string

func (*PodReturnValue) GetErr

func (x *PodReturnValue) GetErr() string

func (*PodReturnValue) ProtoMessage

func (*PodReturnValue) ProtoMessage()

func (*PodReturnValue) ProtoReflect

func (x *PodReturnValue) ProtoReflect() protoreflect.Message

func (*PodReturnValue) Reset

func (x *PodReturnValue) Reset()

func (*PodReturnValue) String

func (x *PodReturnValue) String() string

type ReturnValue

type ReturnValue struct {
	Period int64  `protobuf:"varint,1,opt,name=Period,proto3" json:"Period,omitempty"`
	Err    string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
	// contains filtered or unexported fields
}

func (*ReturnValue) Descriptor deprecated

func (*ReturnValue) Descriptor() ([]byte, []int)

Deprecated: Use ReturnValue.ProtoReflect.Descriptor instead.

func (*ReturnValue) GetErr

func (x *ReturnValue) GetErr() string

func (*ReturnValue) GetPeriod

func (x *ReturnValue) GetPeriod() int64

func (*ReturnValue) ProtoMessage

func (*ReturnValue) ProtoMessage()

func (*ReturnValue) ProtoReflect

func (x *ReturnValue) ProtoReflect() protoreflect.Message

func (*ReturnValue) Reset

func (x *ReturnValue) Reset()

func (*ReturnValue) String

func (x *ReturnValue) String() string

type UnimplementedCheckpointPeriodServer

type UnimplementedCheckpointPeriodServer struct {
}

UnimplementedCheckpointPeriodServer can be embedded to have forward compatible implementations.

func (*UnimplementedCheckpointPeriodServer) CheckpointCreate

func (*UnimplementedCheckpointPeriodServer) ConvertPod

func (*UnimplementedCheckpointPeriodServer) CreateDocker

func (*UnimplementedCheckpointPeriodServer) ExecPod

func (*UnimplementedCheckpointPeriodServer) LogPod

func (*UnimplementedCheckpointPeriodServer) SetCheckpointPeriod

Jump to

Keyboard shortcuts

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