server

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: Apache-2.0 Imports: 62 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinioBackendEnvVar     = "MINIO"
	AmazonBackendEnvVar    = "AMAZON"
	GoogleBackendEnvVar    = "GOOGLE"
	MicrosoftBackendEnvVar = "MICROSOFT"
	LocalBackendEnvVar     = "LOCAL"
)

Valid object storage backends

Variables

This section is empty.

Functions

func GetPachClient added in v1.7.7

func GetPachClient(t testing.TB) *client.APIClient

GetPachClient initializes a new PFSAPIServer and blockAPIServer and begins serving requests for them on a new port, and then returns a client connected to the new servers (allows PFS tests to run in parallel without conflict)

func IsPermissionError added in v1.4.1

func IsPermissionError(err error) bool

IsPermissionError returns true if a given error is a permission error.

func RegisterCacheStats added in v1.7.2

func RegisterCacheStats(cacheName string, groupCacheStats *groupcache.Stats)

RegisterCacheStats creates a new wrapper for groupcache stats that implements the prometheus.Collector interface, and registers it

Types

type APIServer

type APIServer interface {
	pfsclient.APIServer
	txnenv.PfsTransactionServer
}

APIServer represents an api server.

func NewAPIServer

func NewAPIServer(
	env *serviceenv.ServiceEnv,
	txnEnv *txnenv.TransactionEnv,
	etcdPrefix string,
	treeCache *hashtree.Cache,
	storageRoot string,
	memoryRequest int64,
) (APIServer, error)

NewAPIServer creates an APIServer.

type BlockAPIServer added in v1.3.9

type BlockAPIServer interface {
	pfsclient.ObjectAPIServer
}

BlockAPIServer combines BlockAPIServer and ObjectAPIServer.

func NewBlockAPIServer

func NewBlockAPIServer(dir string, cacheBytes int64, backend string, etcdAddress string) (BlockAPIServer, error)

NewBlockAPIServer creates a BlockAPIServer using the credentials it finds in the environment

type CommitEvent added in v1.4.1

type CommitEvent struct {
	Err   error
	Value *pfs.CommitInfo
}

CommitEvent is an event that contains a CommitInfo or an error

type CommitStream added in v1.4.1

type CommitStream interface {
	Stream() <-chan CommitEvent
	Close()
}

CommitStream is a stream of CommitInfos

type ErrBranchInfoNotFound added in v1.8.7

type ErrBranchInfoNotFound struct {
	Branch *pfs.Branch
}

ErrBranchInfoNotFound Branch info could not be found. Typically because of an incomplete deletion of a branch. This struct contains all the information that was used to demonstrate that this invariant is not being satisfied.

func (ErrBranchInfoNotFound) Error added in v1.8.7

func (e ErrBranchInfoNotFound) Error() string

type ErrBranchProvenanceTransitivity added in v1.8.7

type ErrBranchProvenanceTransitivity struct {
	BranchInfo     *pfs.BranchInfo
	FullProvenance []*pfs.Branch
}

ErrBranchProvenanceTransitivity Branch provenance is not transitively closed. This struct contains all the information that was used to demonstrate that this invariant is not being satisfied.

func (ErrBranchProvenanceTransitivity) Error added in v1.8.7

type ErrCommitInfoNotFound added in v1.8.7

type ErrCommitInfoNotFound struct {
	Location string
	Commit   *pfs.Commit
}

ErrCommitInfoNotFound Commit info could not be found. Typically because of an incomplete deletion of a commit. This struct contains all the information that was used to demonstrate that this invariant is not being satisfied.

func (ErrCommitInfoNotFound) Error added in v1.8.7

func (e ErrCommitInfoNotFound) Error() string

type ErrHeadProvenanceInconsistentWithBranch added in v1.8.7

type ErrHeadProvenanceInconsistentWithBranch struct {
	BranchInfo     *pfs.BranchInfo
	ProvBranchInfo *pfs.BranchInfo
	HeadCommitInfo *pfs.CommitInfo
}

ErrHeadProvenanceInconsistentWithBranch The head provenance of a branch does not match the branch's provenance This struct contains all the information that was used to demonstrate that this invariant is not being satisfied.

func (ErrHeadProvenanceInconsistentWithBranch) Error added in v1.8.7

type ErrInconsistentCommitProvenance added in v1.8.7

type ErrInconsistentCommitProvenance struct {
	CommitProvenance *pfs.CommitProvenance
}

ErrInconsistentCommitProvenance Commit provenance somehow has a branch and commit from different repos. This struct contains all the information that was used to demonstrate that this invariant is not being satisfied.

func (ErrInconsistentCommitProvenance) Error added in v1.8.7

type ErrNilCommitInSubvenance added in v1.8.7

type ErrNilCommitInSubvenance struct {
	CommitInfo      *pfs.CommitInfo
	SubvenanceRange *pfs.CommitRange
}

ErrNilCommitInSubvenance Commit provenance somehow has a branch and commit from different repos. This struct contains all the information that was used to demonstrate that this invariant is not being satisfied.

func (ErrNilCommitInSubvenance) Error added in v1.8.7

func (e ErrNilCommitInSubvenance) Error() string

type ErrProvenanceOfSubvenance added in v1.8.7

type ErrProvenanceOfSubvenance struct {
	CommitInfo     *pfs.CommitInfo
	SubvCommitInfo *pfs.CommitInfo
}

ErrProvenanceOfSubvenance The commit was not found in its subvenance's provenance This struct contains all the information that was used to demonstrate that this invariant is not being satisfied.

func (ErrProvenanceOfSubvenance) Error added in v1.8.7

type ErrProvenanceTransitivity added in v1.8.7

type ErrProvenanceTransitivity struct {
	CommitInfo     *pfs.CommitInfo
	FullProvenance []*pfs.Commit
}

ErrProvenanceTransitivity Commit provenance is not transitively closed. This struct contains all the information that was used to demonstrate that this invariant is not being satisfied.

func (ErrProvenanceTransitivity) Error added in v1.8.7

type ErrSubvenanceOfProvenance added in v1.8.7

type ErrSubvenanceOfProvenance struct {
	CommitInfo     *pfs.CommitInfo
	ProvCommitInfo *pfs.CommitInfo
}

ErrSubvenanceOfProvenance The commit was not found in its provenance's subvenance This struct contains all the information that was used to demonstrate that this invariant is not being satisfied.

func (ErrSubvenanceOfProvenance) Error added in v1.8.7

type Propagater added in v1.9.0

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

Propagater is an object that is used to propagate PFS branches at the end of a transaction. The transactionenv package provides the interface for this and will call the Run function at the end of a transaction.

func (*Propagater) PropagateCommit added in v1.9.0

func (t *Propagater) PropagateCommit(branch *pfs.Branch, isNewCommit bool) error

PropagateCommit marks a branch as needing propagation once the transaction successfully ends. This will be performed by the Run function.

func (*Propagater) Run added in v1.9.0

func (t *Propagater) Run() error

Run performs any final tasks and cleanup tasks in the STM, such as propagating branches

Jump to

Keyboard shortcuts

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