cache_service

package
v2.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: Apache-2.0, Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TaskVersionKey     = "task-version"
	ExecNameKey        = "execution-name"
	ExecDomainKey      = "exec-domain"
	ExecProjectKey     = "exec-project"
	ExecNodeIDKey      = "exec-node"
	ExecTaskAttemptKey = "exec-attempt"
	ExecOrgKey         = "exec-org"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(httpClient connect.HTTPClient, store *storage.DataStore, baseURL string, maxCacheAge time.Duration, opts ...connect.ClientOption) *Client

func NewHTTPClient

func NewHTTPClient(store *storage.DataStore, baseURL string, maxCacheAge time.Duration, opts ...connect.ClientOption) *Client

func NewWithServiceClient

func NewWithServiceClient(service v2connect.CacheServiceClient, store *storage.DataStore, maxCacheAge time.Duration) *Client

func (*Client) Get

func (c *Client) Get(ctx context.Context, key catalog.Key) (catalog.Entry, error)

func (*Client) GetOrExtendReservation

func (c *Client) GetOrExtendReservation(ctx context.Context, key catalog.Key, ownerID string, heartbeatInterval time.Duration) (*cacheservicepb.Reservation, error)

func (*Client) GetReservationCache

func (c *Client) GetReservationCache(ownerID string) catalog.ReservationCache

func (*Client) Put

func (c *Client) Put(ctx context.Context, key catalog.Key, reader io.OutputReader, metadata catalog.Metadata) (catalog.Status, error)

func (*Client) ReleaseReservation

func (c *Client) ReleaseReservation(ctx context.Context, key catalog.Key, ownerID string) error

func (*Client) Update

func (c *Client) Update(ctx context.Context, key catalog.Key, reader io.OutputReader, metadata catalog.Metadata) (catalog.Status, error)

func (*Client) UpdateReservationCache

func (c *Client) UpdateReservationCache(ownerID string, entry catalog.ReservationCache)

Jump to

Keyboard shortcuts

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