server

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2017 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Overview

Package server is a generated protocol buffer package.

It is generated from these files:

server/pfs/server/driver.proto

It has these top-level messages:

PutFileRecord
PutFileRecords

Index

Constants

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

Valid object storage backends

View Source
const HTTPPort = 652

HTTPPort specifies the port the server will listen on

Variables

View Source
var (
	ErrInvalidLengthDriver = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDriver   = fmt.Errorf("proto: integer overflow")
)

Functions

func IsPermissionError added in v1.4.1

func IsPermissionError(err error) bool

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

func ValidateRepoName added in v1.4.1

func ValidateRepoName(name string) error

ValidateRepoName determines if a repo name is valid

Types

type APIServer

type APIServer interface {
	pfsclient.APIServer
}

APIServer represents and api server.

func NewAPIServer

func NewAPIServer(address string, etcdAddresses []string, etcdPrefix string, cacheBytes 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

func NewLocalBlockAPIServer

func NewLocalBlockAPIServer(dir string) (BlockAPIServer, error)

NewLocalBlockAPIServer creates a BlockAPIServer.

func NewObjBlockAPIServer

func NewObjBlockAPIServer(dir string, cacheBytes int64, etcdAddress string, objClient obj.Client) (BlockAPIServer, error)

NewObjBlockAPIServer create a BlockAPIServer from an obj.Client.

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 HTTPServer added in v1.5.1

type HTTPServer struct {
	*httprouter.Router
	// contains filtered or unexported fields
}

HTTPServer serves GetFile requests over HTTP e.g. http://localhost:30652/v1/pfs/repos/foo/commits/b7a1923be56744f6a3f1525ec222dc3b/files/ttt.log

func NewHTTPServer added in v1.5.1

func NewHTTPServer(address string, etcdAddresses []string, etcdPrefix string, cacheBytes int64) (*HTTPServer, error)

NewHTTPServer creates an APIServer.

type ListFileMode added in v1.4.1

type ListFileMode int

ListFileMode specifies how ListFile executes.

const (
	// ListFileNORMAL computes sizes for files but not for directories
	ListFileNORMAL ListFileMode = iota
	// ListFileFAST does not compute sizes for files or directories
	ListFileFAST
	// ListFileRECURSE computes sizes for files and directories
	ListFileRECURSE
)

type PutFileRecord added in v1.4.1

type PutFileRecord struct {
	SizeBytes  int64  `protobuf:"varint,1,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"`
	ObjectHash string `protobuf:"bytes,2,opt,name=objectHash,proto3" json:"objectHash,omitempty"`
}

PutFileRecord is used to record PutFile requests in etcd temporarily.

func (*PutFileRecord) Descriptor added in v1.4.1

func (*PutFileRecord) Descriptor() ([]byte, []int)

func (*PutFileRecord) GetObjectHash added in v1.4.1

func (m *PutFileRecord) GetObjectHash() string

func (*PutFileRecord) GetSizeBytes added in v1.4.1

func (m *PutFileRecord) GetSizeBytes() int64

func (*PutFileRecord) Marshal added in v1.5.0

func (m *PutFileRecord) Marshal() (dAtA []byte, err error)

func (*PutFileRecord) MarshalTo added in v1.5.0

func (m *PutFileRecord) MarshalTo(dAtA []byte) (int, error)

func (*PutFileRecord) ProtoMessage added in v1.4.1

func (*PutFileRecord) ProtoMessage()

func (*PutFileRecord) Reset added in v1.4.1

func (m *PutFileRecord) Reset()

func (*PutFileRecord) Size added in v1.5.0

func (m *PutFileRecord) Size() (n int)

func (*PutFileRecord) String added in v1.4.1

func (m *PutFileRecord) String() string

func (*PutFileRecord) Unmarshal added in v1.5.0

func (m *PutFileRecord) Unmarshal(dAtA []byte) error

type PutFileRecords added in v1.4.1

type PutFileRecords struct {
	Split   bool             `protobuf:"varint,1,opt,name=split,proto3" json:"split,omitempty"`
	Records []*PutFileRecord `protobuf:"bytes,2,rep,name=records" json:"records,omitempty"`
}

func (*PutFileRecords) Descriptor added in v1.4.1

func (*PutFileRecords) Descriptor() ([]byte, []int)

func (*PutFileRecords) GetRecords added in v1.4.1

func (m *PutFileRecords) GetRecords() []*PutFileRecord

func (*PutFileRecords) GetSplit added in v1.4.1

func (m *PutFileRecords) GetSplit() bool

func (*PutFileRecords) Marshal added in v1.5.0

func (m *PutFileRecords) Marshal() (dAtA []byte, err error)

func (*PutFileRecords) MarshalTo added in v1.5.0

func (m *PutFileRecords) MarshalTo(dAtA []byte) (int, error)

func (*PutFileRecords) ProtoMessage added in v1.4.1

func (*PutFileRecords) ProtoMessage()

func (*PutFileRecords) Reset added in v1.4.1

func (m *PutFileRecords) Reset()

func (*PutFileRecords) Size added in v1.5.0

func (m *PutFileRecords) Size() (n int)

func (*PutFileRecords) String added in v1.4.1

func (m *PutFileRecords) String() string

func (*PutFileRecords) Unmarshal added in v1.5.0

func (m *PutFileRecords) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

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