Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBuilder ¶
func NewBuilder(hooks *BuilderHooks) libhive.Builder
NewBuilder creates a new fake builder.
func NewContainerBackend ¶
func NewContainerBackend(hooks *BackendHooks) libhive.ContainerBackend
NewBackend creates a new fake container backend.
Types ¶
type BackendHooks ¶
type BackendHooks struct { CreateContainer func(image string, opt libhive.ContainerOptions) (string, error) StartContainer func(image, containerID string, opt libhive.ContainerOptions) (*libhive.ContainerInfo, error) DeleteContainer func(containerID string) error PauseContainer func(containerID string) error UnpauseContainer func(containerID string) error RunProgram func(containerID string, cmd []string) (*libhive.ExecInfo, error) NetworkNameToID func(string) (string, error) CreateNetwork func(string) (string, error) RemoveNetwork func(networkID string) error ContainerIP func(containerID, networkID string) (net.IP, error) ConnectContainer func(containerID, networkID string) error DisconnectContainer func(containerID, networkID string) error }
BackendHooks can be used to override the behavior of the fake backend.
type BuilderHooks ¶
type BuilderHooks struct { BuildClientImage func(context.Context, libhive.ClientDesignator) (string, error) BuildSimulatorImage func(context.Context, string) (string, error) ReadFile func(ctx context.Context, image string, file string) ([]byte, error) }
BuilderHooks can be used to override the behavior of the fake builder.
Click to show internal directories.
Click to hide internal directories.