synclet

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const Port = 23551

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeSyncletClient

type FakeSyncletClient struct {
	UpdateContainerCount         int
	CommandsRunCount             int
	UpdateContainerHotReload     bool
	ClosedCount                  int
	UpdateContainerErrorToReturn error
	PodID                        k8s.PodID
	Namespace                    k8s.Namespace
}

NOTE(maia): idk if we even need this -- maybe what we want is a real synclet client with a fake docker client inside it. But ¯\_(ツ)_/¯

func NewFakeSyncletClient

func NewFakeSyncletClient() *FakeSyncletClient

func (*FakeSyncletClient) Close

func (c *FakeSyncletClient) Close() error

func (*FakeSyncletClient) ContainerIDForPod

func (c *FakeSyncletClient) ContainerIDForPod(ctx context.Context, podID k8s.PodID, imageID reference.NamedTagged) (container.ID, error)

func (*FakeSyncletClient) UpdateContainer

func (c *FakeSyncletClient) UpdateContainer(ctx context.Context, containerID container.ID,
	tarArchive []byte, filesToDelete []string, commands []model.Cmd, hotReload bool) error

type GRPCServer

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

func NewGRPCServer

func NewGRPCServer(del *Synclet) *GRPCServer

func (*GRPCServer) UpdateContainer

type Synclet

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

func NewSynclet

func NewSynclet(dCli docker.Client) *Synclet

func WireSynclet

func WireSynclet(ctx context.Context, env k8s.Env, runtime container.Runtime) (*Synclet, error)

func (Synclet) UpdateContainer

func (s Synclet) UpdateContainer(
	ctx context.Context,
	containerId container.ID,
	tarArchive []byte,
	filesToDelete []string,
	commands []model.Cmd,
	hotReload bool) error

type SyncletCli

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

func NewGRPCClient

func NewGRPCClient(conn *grpc.ClientConn) *SyncletCli

func (*SyncletCli) Close

func (s *SyncletCli) Close() error

func (*SyncletCli) UpdateContainer

func (s *SyncletCli) UpdateContainer(
	ctx context.Context,
	containerId container.ID,
	tarArchive []byte,
	filesToDelete []string,
	commands []model.Cmd,
	hotReload bool) error

type SyncletClient

type SyncletClient interface {
	UpdateContainer(ctx context.Context, containerID container.ID, tarArchive []byte,
		filesToDelete []string, commands []model.Cmd, hotReload bool) error

	Close() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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