buildkitskipper

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASKVClient

type ASKVClient interface {
	AutoSkipExists(ctx context.Context, org string, hash []byte) (bool, error)
	AutoSkipAdd(ctx context.Context, org, path, target string, hash []byte) error
}

ASKVClient provides methods which allow for adding & checking the existence of an auto-skip hash. The current implementations are a local BoltDB & a remote gRPC service.

type CloudClient

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

CloudClient implements the Cloud API version of the ASKVClient.

func NewCloud

func NewCloud(client ASKVClient) (*CloudClient, error)

NewCloud creates and returns a new Cloud API implementation.

func (*CloudClient) Add

func (c *CloudClient) Add(ctx context.Context, org, target string, data []byte) error

Add a new hash to the Cloud DB.

func (*CloudClient) Exists

func (c *CloudClient) Exists(ctx context.Context, org string, data []byte) (bool, error)

Exists checks if an auto-skip hash exists.

type LocalBuildkitSkipper

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

LocalBuildkitSkipper uses BoltDB to store & retrieve auto-skip hashes.

func NewLocal

func NewLocal(path string) (*LocalBuildkitSkipper, error)

NewLocal creates and returns a BoltDB implementation of the auto-skip client.

func (*LocalBuildkitSkipper) Add

func (l *LocalBuildkitSkipper) Add(ctx context.Context, org, target string, data []byte) error

Add a new hash value (org & target are ignored in this implementation).

func (*LocalBuildkitSkipper) Exists

func (l *LocalBuildkitSkipper) Exists(ctx context.Context, org string, data []byte) (bool, error)

Exists checks if the hash exists.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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