Documentation ¶
Overview ¶
Package docker provides utility functions for checking the Docker environment. It also provides two implementations of the NodeService interface defined in the privatebtc package.
Index ¶
- Constants
- func CheckImageExistsInLocalCache(ctx context.Context, dockerClient *client.Client, imageName string) error
- func GetDockerHost() (string, error)
- func NewClient() (*client.Client, error)
- func PullImage(ctx context.Context, dockerClient *client.Client, imageName string) error
- type ImageNotFoundError
Constants ¶
View Source
const BitcoinImage = "ruimarinho/bitcoin-core:latest"
BitcoinImage is the name of the docker Image used for the bitcoin node.
Variables ¶
This section is empty.
Functions ¶
func CheckImageExistsInLocalCache ¶
func CheckImageExistsInLocalCache( ctx context.Context, dockerClient *client.Client, imageName string, ) error
CheckImageExistsInLocalCache returns whether the given docker Image exists in the local Image cache.
func GetDockerHost ¶
GetDockerHost returns the actual docker host from different alternatives. Windows is not supported.
Types ¶
type ImageNotFoundError ¶
type ImageNotFoundError struct {
Image string
}
ImageNotFoundError is used to whenever the ruimarinho/bitcoin-core docker Image is not found in the local Image cache.
func (*ImageNotFoundError) Error ¶
func (e *ImageNotFoundError) Error() string
func (*ImageNotFoundError) Is ¶
func (e *ImageNotFoundError) Is(target error) bool
Is implements errors.Is.
Directories ¶
Path | Synopsis |
---|---|
Package dockertest provides implementations of the privatebtc.NodeService and privatebtc.NodeHandler interfaces using the https://github.com/ory/dockertest package.
|
Package dockertest provides implementations of the privatebtc.NodeService and privatebtc.NodeHandler interfaces using the https://github.com/ory/dockertest package. |
Package testcontainers provides implementations of the privatebtc.NodeService and privatebtc.NodeHandler interfaces the using the https://github.com/testcontainers/testcontainers-go package.
|
Package testcontainers provides implementations of the privatebtc.NodeService and privatebtc.NodeHandler interfaces the using the https://github.com/testcontainers/testcontainers-go package. |
Click to show internal directories.
Click to hide internal directories.