Documentation
¶
Overview ¶
Copyright © 2024 Bopmatic, LLC. All Rights Reserved. * * See LICENSE file at the root of this package for license terms
Index ¶
- Constants
- Variables
- func CopyDir(src string, dst string) error
- func CopyFile(src string, dst string) error
- func CopyFileToDir(src string, dstDir string) error
- func DoesLocalImageNeedUpdate(repository string, tag string) (bool, error)
- func GetLocalImageDigest(repository string, tag string) (string, error)
- func GetRemoteImageDigest(repository string, tag string) (string, error)
- func HasBopmaticBuildImage() (bool, error)
- func HasImage(repository string, tag string) (bool, error)
- func NewDaprClient(ctx context.Context) (dapr.Client, error)
- func RenameFile(src string, dst string) error
- func RenameFileToDir(src string, dstDir string) error
- func RunContainerCommand(ctx context.Context, cmdAndArgs []string, stdOut io.Writer, stdErr io.Writer) error
- func RunHostCommand(ctx context.Context, cmdAndArgs []string, stdOut io.Writer, stdErr io.Writer) error
- func SymlinkFile(src string, dst string) error
- func SymlinkFileToDir(src string, dstDir string) error
Constants ¶
const ( BopmaticImageRepo = "bopmatic/build" BopmaticImageTag = "latest" BopmaticBuildImageName = BopmaticImageRepo + ":" + BopmaticImageTag DockerInstallErrMsg = "Could not invoke docker; please double check that you have docker installed: %w" )
Variables ¶
var ErrImageNotFound = errors.New("image does not exist")
Functions ¶
func CopyFileToDir ¶
func GetRemoteImageDigest ¶
@todo investigate whether this is achievable with github.com/docker/docker rather than writing our own custom json parsing logic
func HasBopmaticBuildImage ¶
func NewDaprClient ¶
NewDaprClient instantiates a Dapr client connected to the default dapr port on localhost. This is an alternative to dapr.NewClient() which has a bug that will DoS callers if the server isn't up yet. Additionally this version replaces the default GRPC exponential backoff strategy that defaults to O(1s) delays with a linear backoff strategy with O(10ms) delays. For our use case we're only ever connecting to localhost and don't want to induce unnecessary latency as this can potentially translate into end-user latency when invoked during an AWS Lambda cold start
func RenameFile ¶
func RenameFileToDir ¶
func RunContainerCommand ¶
func RunHostCommand ¶
func SymlinkFile ¶
func SymlinkFileToDir ¶
Types ¶
This section is empty.