client

package
v0.1.23-oss Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

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(cacheDir string, fetchTimeout time.Duration) *Client

func (*Client) CasClient

func (c *Client) CasClient() *cacheman.Client

func (*Client) CheckStatusRequest

func (c *Client) CheckStatusRequest() (protocol.ResultType, int32, error)

func (*Client) Clean

func (c *Client) Clean(req protocol.CleanReq) error

func (*Client) Close

func (c *Client) Close() error

func (*Client) Execute

func (c *Client) Execute(req entities.Hash, patches []entities.Hash, storeMapResult, prefetchInputs bool) (entities.Hash, error)

func (*Client) ExecuteSupport

func (c *Client) ExecuteSupport() (bool, error)

func (*Client) FetchGitObjectRequest

func (c *Client) FetchGitObjectRequest(key entities.Hash) (cacheman.ResultType, error)

func (*Client) FetchMapRequest

func (c *Client) FetchMapRequest(key entities.Hash) error

func (*Client) FetchObjectRequest

func (c *Client) FetchObjectRequest(key entities.Hash, objType cacheman.RequestObjectType) (cacheman.ResultType, error)

func (*Client) FetchStatRequest

func (c *Client) FetchStatRequest(key entities.Hash) (entities.StatInfo, error)

func (*Client) GetDebug

func (c *Client) GetDebug() (bool, error)

func (*Client) GetRefs

func (c *Client) GetRefs(server string, project string, refs []string) ([]entities.Hash, error)

func (*Client) IsObjectRemote

func (c *Client) IsObjectRemote(key entities.Hash) (bool, error)

func (*Client) KeepAlive

func (c *Client) KeepAlive(key entities.Hash) error

func (*Client) LRUSize

func (c *Client) LRUSize() (uint64, error)

func (*Client) MapResults

func (c *Client) MapResults(from entities.Hash) ([]entities.Hash, error)

func (*Client) Ping

func (c *Client) Ping() error

func (*Client) PingBinary

func (c *Client) PingBinary() error

func (*Client) Prefetch

func (c *Client) Prefetch(blobs, objects []entities.Hash, priority float64) error

func (*Client) PushBuildMetrics

func (c *Client) PushBuildMetrics(req *protocol.PushBuildMetricsReq) error

func (*Client) PutRefs

func (c *Client) PutRefs(server string, project string, refs []entities.RefHash, blocking bool) error

func (*Client) ReadConfig

func (c *Client) ReadConfig() (*instance.Config, error)

func (*Client) RemoteConfig

func (c *Client) RemoteConfig(prevConfig *instance.ConfigOptional) (*instance.ConfigOptional, error)

func (*Client) RemoteOK

func (c *Client) RemoteOK() error

func (*Client) SearchRefs

func (c *Client) SearchRefs(server string, project string, refPrefix string, limit int) ([]entities.ProjectRefHash, error)

func (*Client) SendNewMap

func (c *Client) SendNewMap(from, to entities.Hash, localOnly bool) error

func (*Client) SendNewObject

func (c *Client) SendNewObject(key entities.Hash, objType cacheman.RequestObjectType) error

func (*Client) SendNotifyUse

func (c *Client) SendNotifyUse(key entities.Hash) error

func (*Client) Serve

func (c *Client) Serve(ctx context.Context) error

func (*Client) SetDebug

func (c *Client) SetDebug(debug bool) error

func (*Client) StartGC

func (c *Client) StartGC() error

func (*Client) Stats

func (c *Client) Stats() (protocol.CacheManStats, error)

func (*Client) TotalSize

func (c *Client) TotalSize() (uint64, error)

func (*Client) UseMany

func (c *Client) UseMany(hashes []entities.Hash) error

func (*Client) WaitFor

func (c *Client) WaitFor(timeout time.Duration, priority float64, objects []entities.Hash) error

func (*Client) WaitIdle

func (c *Client) WaitIdle(timeout time.Duration) error

type HttpClient

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

func NewHTTPClient

func NewHTTPClient(cacheDir string) *HttpClient

func (*HttpClient) Clean

func (c *HttpClient) Clean(req protocol.CleanReq) error

func (*HttpClient) Execute

func (c *HttpClient) Execute(req entities.Hash, patches []entities.Hash, storeMapResult, prefetchInputs bool) (entities.Hash, error)

func (*HttpClient) ExecuteSupport

func (c *HttpClient) ExecuteSupport() (bool, error)

func (*HttpClient) FetchMapRequest

func (c *HttpClient) FetchMapRequest(key entities.Hash) error

func (*HttpClient) GetDebug

func (c *HttpClient) GetDebug() (bool, error)

func (*HttpClient) GetRefs

func (c *HttpClient) GetRefs(server string, project string, refs []string) ([]entities.Hash, error)

func (*HttpClient) InterfaceVersion

func (c *HttpClient) InterfaceVersion() (implemented, required string, err error)

func (*HttpClient) IsObjectRemote

func (c *HttpClient) IsObjectRemote(key entities.Hash) (bool, error)

func (*HttpClient) KeepAlive

func (c *HttpClient) KeepAlive(key entities.Hash) error

func (*HttpClient) LRUSize

func (c *HttpClient) LRUSize() (uint64, error)

func (*HttpClient) MapResults

func (c *HttpClient) MapResults(from entities.Hash) ([]entities.Hash, error)

func (*HttpClient) Ping

func (c *HttpClient) Ping() error

func (*HttpClient) Prefetch

func (c *HttpClient) Prefetch(blobs, objects []entities.Hash, priority float64) error

func (*HttpClient) PushBuildMetrics

func (c *HttpClient) PushBuildMetrics(req *protocol.PushBuildMetricsReq) error

func (*HttpClient) PutRefs

func (c *HttpClient) PutRefs(server string, project string, refs []entities.RefHash, blocking bool) error

func (*HttpClient) ReadConfig

func (c *HttpClient) ReadConfig() (*instance.Config, error)

func (*HttpClient) RemoteConfig

func (c *HttpClient) RemoteConfig(prevConfig *instance.ConfigOptional) (*instance.ConfigOptional, error)

func (*HttpClient) RemoteOK

func (c *HttpClient) RemoteOK() error

func (*HttpClient) SearchRefs

func (c *HttpClient) SearchRefs(server string, project string, refPrefix string, limit int) ([]entities.ProjectRefHash, error)

func (*HttpClient) SendNewMap

func (c *HttpClient) SendNewMap(from, to entities.Hash, localOnly bool) error

func (*HttpClient) SetDebug

func (c *HttpClient) SetDebug(debug bool) error

func (*HttpClient) StartGC

func (c *HttpClient) StartGC() error

func (*HttpClient) Stats

func (c *HttpClient) Stats() (protocol.CacheManStats, error)

func (*HttpClient) TotalSize

func (c *HttpClient) TotalSize() (uint64, error)

func (*HttpClient) UseMany

func (c *HttpClient) UseMany(hashes []entities.Hash) error

func (*HttpClient) WaitFor

func (c *HttpClient) WaitFor(timeout time.Duration, priority float64, objects []entities.Hash) (err error)

func (*HttpClient) WaitIdle

func (c *HttpClient) WaitIdle(timeout time.Duration) error

type WriterFunc

type WriterFunc func(w io.Writer) error

Jump to

Keyboard shortcuts

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