servers

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

Documentation

Index

Constants

View Source
const ClientMinVersion = "0.1.2"
View Source
const ServerVersion = "0.1.1"

Variables

This section is empty.

Functions

func LoadAndSetACLs

func LoadAndSetACLs(ctx context.Context, prov remote.RemoteCloser, aclFilePath string) error

LoadAndSetACLs reads the specified ACL bootstrap JSON file and applies the entries. Note: This behavior is declarative on a per-file level. Other files in the ACL directory tree that are not mentioned in the bootstrap file are left completely untouched. However, any specific file mentioned in the bootstrap file will have its content completely overwritten by the new definition.

func NewACLServer

func NewACLServer(server remote.RemoteCloser, evaluator *remote.ACLEvaluator) remote.RemoteCloser

Types

type ACLServer

type ACLServer struct {
	remote.RemoteCloser
	// contains filtered or unexported fields
}

func (*ACLServer) AddMapResult

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

func (*ACLServer) GetRefs

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

func (*ACLServer) PutRefs

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

func (*ACLServer) SearchRefs

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

type Hash

type Hash = entities.Hash

type LoggingServer

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

func NewLoggingServer

func NewLoggingServer(server remote.RemoteCloser, log *log.Logger, maxItemsToList int, samplingRate float64) *LoggingServer

func (*LoggingServer) AddMapResult

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

AddMapResult implements remote.RemoteProvider.

func (*LoggingServer) Close

func (s *LoggingServer) Close() error

Close implements remote.RemoteCloser.

func (*LoggingServer) GetObject

GetObject implements remote.RemoteProvider.

func (*LoggingServer) GetRefs

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

GetRefs implements remote.RemoteProvider.

func (*LoggingServer) Headers

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

Headers implements remote.RemoteProvider.

func (*LoggingServer) MapResults

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

MapResults implements remote.RemoteProvider.

func (*LoggingServer) Mark

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

Mark implements remote.RemoteProvider.

func (*LoggingServer) PutObject

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

PutObject implements remote.RemoteProvider.

func (*LoggingServer) PutRefs

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

PutRefs implements remote.RemoteProvider.

func (*LoggingServer) SHA256

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

SHA256s implements remote.RemoteProvider.

func (*LoggingServer) SearchRefs

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

SearchRefs implements remote.RemoteProvider.

func (*LoggingServer) Version

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

Version implements remote.RemoteProvider.

func (*LoggingServer) WhoAmI

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

WhoAmI implements remote.RemoteProvider.

type New

type New func(opts ...ServerOpt) (remote.RemoteCloser, error)

type NoHashValidation

type NoHashValidation struct {
	Value bool
}

type NoLinkValidation

type NoLinkValidation struct {
	Value bool
}

type ServerOpt

type ServerOpt interface{}

func NoHashValidationOpt

func NoHashValidationOpt(value bool) ServerOpt

func NoLinkValidationOpt

func NoLinkValidationOpt(value bool) ServerOpt

type ZstdCompressor

type ZstdCompressor struct{}

func (*ZstdCompressor) Compress

func (z *ZstdCompressor) Compress(buf []byte) ([]byte, error)

func (*ZstdCompressor) Decompress

func (*ZstdCompressor) Decompress(buf []byte) ([]byte, error)

func (*ZstdCompressor) NewReader

func (*ZstdCompressor) NewReader(r io.Reader) io.ReadCloser

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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