inmemory

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: 15 Imported by: 0

Documentation

Index

Constants

View Source
const InitObjectsCount = 2 // empty blob and empty dir

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryServer

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

func New

func New(opts ...servers.ServerOpt) *InMemoryServer

func (*InMemoryServer) AddMapResult

func (s *InMemoryServer) AddMapResult(ctx context.Context, from remote.Hash, to remote.Hash) error

AddMapResult implements remote.RemoteProvider.

func (*InMemoryServer) Close

func (s *InMemoryServer) Close() error

func (*InMemoryServer) GetObject

GetObject implements remote.RemoteProvider.

func (*InMemoryServer) GetRefs

func (s *InMemoryServer) GetRefs(ctx context.Context, server string, project string, refs []string) ([]remote.Hash, error)

GetRefs implements remote.RemoteProvider.

func (*InMemoryServer) Headers

func (s *InMemoryServer) Headers(ctx context.Context, keys []remote.Hash) ([]entities.ObjectHeader, error)

Headers implements remote.RemoteProvider.

func (*InMemoryServer) MapResults

func (s *InMemoryServer) MapResults(ctx context.Context, hash remote.Hash) ([]remote.Hash, error)

MapResults implements remote.RemoteProvider.

func (*InMemoryServer) Mark

func (i *InMemoryServer) Mark(ctx context.Context, hash remote.Hash, key string, value string) (int64, error)

Mark implements remote.RemoteProvider.

func (*InMemoryServer) PutObject

func (s *InMemoryServer) PutObject(ctx context.Context, key remote.Hash, reader remote.ContentReadCloser) (retErr error)

PutObject implements remote.RemoteProvider.

func (*InMemoryServer) PutRefs

func (s *InMemoryServer) PutRefs(ctx context.Context, server string, project string, refs []remote.RefHash) error

PutRefs implements remote.RemoteProvider.

func (*InMemoryServer) SHA256

func (s *InMemoryServer) SHA256(ctx context.Context, keys []remote.Hash) ([]entities.SHA256, error)

SHA256 implements RemoteProvider.

func (*InMemoryServer) SearchRefs

func (s *InMemoryServer) SearchRefs(ctx context.Context, server string, project string, refPrefix string, limit int) ([]remote.ProjectRefHash, error)

SearchRefs implements remote.RemoteProvider.

func (*InMemoryServer) Stats

func (s *InMemoryServer) Stats() Stats

func (*InMemoryServer) Version

func (s *InMemoryServer) Version(ctx context.Context) (string, error)

Version implements remote.RemoteProvider.

func (*InMemoryServer) WhoAmI

func (s *InMemoryServer) WhoAmI(ctx context.Context) (string, error)

WhoAmI implements remote.RemoteProvider.

type ObjectReader

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

func (*ObjectReader) Close

func (o *ObjectReader) Close() error

Close implements remote.ObjectReadCloserI.

func (*ObjectReader) Encoding

func (o *ObjectReader) Encoding() string

Encoding implements remote.ObjectReadCloserI.

func (*ObjectReader) Hash

func (o *ObjectReader) Hash() remote.Hash

Hash implements remote.ObjectReadCloserI.

func (*ObjectReader) Read

func (o *ObjectReader) Read(p []byte) (n int, err error)

Read implements remote.ObjectReadCloserI.

type ProjectRefs

type ProjectRefs map[string]remote.Hash

type ServerRefs

type ServerRefs map[string]ProjectRefs

type Stats

type Stats struct {
	ObjectsCount int64
	MapsCount    int64
	RefsCount    int64
	BrokenLinks  int64
	FailCount    int64
}

func (*Stats) Count

func (s *Stats) Count() int64

Jump to

Keyboard shortcuts

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