Help us shape the future of Go! Take the 2026 Go Developer Survey

synclet

package
v0.10.25 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const Port = 23551

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCServer

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

func NewGRPCServer

func NewGRPCServer(del syncletDelegate) *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, 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
}

func FakeGRPCWrapper added in v0.10.0

func FakeGRPCWrapper(ctx context.Context, c *TestSyncletClient) (SyncletClient, error)

type TestSyncletClient added in v0.10.0

type TestSyncletClient struct {

	// To make sure that any Docker calls we're asserting on
	// came via the synclet (and not through some other path
	// to the same Docker client)
	UpdateContainerCount int

	// To make sure client was configured correctly by SyncletClientManager
	PodID     k8s.PodID
	Namespace k8s.Namespace
	// contains filtered or unexported fields
}

func NewTestSyncletClient added in v0.10.0

func NewTestSyncletClient(dCli docker.Client) *TestSyncletClient

func (*TestSyncletClient) Close added in v0.10.0

func (c *TestSyncletClient) Close() error

func (*TestSyncletClient) UpdateContainer added in v0.10.0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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