Documentation
¶
Overview ¶
Package remote provides a client/server architecture for connecting to and hosting a remote synchronization endpoint.
Index ¶
- func NewEndpoint(connection net.Conn, root string, session string, ...) (synchronization.Endpoint, error)
- func ServeEndpoint(logger *logging.Logger, connection net.Conn, options ...EndpointServerOption) error
- type EndpointConnectionValidator
- type EndpointRequest
- func (*EndpointRequest) Descriptor() ([]byte, []int)
- func (m *EndpointRequest) GetPoll() *PollRequest
- func (m *EndpointRequest) GetScan() *ScanRequest
- func (m *EndpointRequest) GetStage() *StageRequest
- func (m *EndpointRequest) GetSupply() *SupplyRequest
- func (m *EndpointRequest) GetTransition() *TransitionRequest
- func (*EndpointRequest) ProtoMessage()
- func (m *EndpointRequest) Reset()
- func (m *EndpointRequest) String() string
- func (m *EndpointRequest) XXX_DiscardUnknown()
- func (m *EndpointRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EndpointRequest) XXX_Merge(src proto.Message)
- func (m *EndpointRequest) XXX_Size() int
- func (m *EndpointRequest) XXX_Unmarshal(b []byte) error
- type EndpointServerOption
- func WithConfiguration(configuration *synchronization.Configuration) EndpointServerOption
- func WithConnectionValidator(validator EndpointConnectionValidator) EndpointServerOption
- func WithEndpointOption(option local.EndpointOption) EndpointServerOption
- func WithRoot(root string) EndpointServerOption
- type InitializeSynchronizationRequest
- func (*InitializeSynchronizationRequest) Descriptor() ([]byte, []int)
- func (m *InitializeSynchronizationRequest) GetAlpha() bool
- func (m *InitializeSynchronizationRequest) GetConfiguration() *synchronization.Configuration
- func (m *InitializeSynchronizationRequest) GetRoot() string
- func (m *InitializeSynchronizationRequest) GetSession() string
- func (m *InitializeSynchronizationRequest) GetVersion() synchronization.Version
- func (*InitializeSynchronizationRequest) ProtoMessage()
- func (m *InitializeSynchronizationRequest) Reset()
- func (m *InitializeSynchronizationRequest) String() string
- func (m *InitializeSynchronizationRequest) XXX_DiscardUnknown()
- func (m *InitializeSynchronizationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InitializeSynchronizationRequest) XXX_Merge(src proto.Message)
- func (m *InitializeSynchronizationRequest) XXX_Size() int
- func (m *InitializeSynchronizationRequest) XXX_Unmarshal(b []byte) error
- type InitializeSynchronizationResponse
- func (*InitializeSynchronizationResponse) Descriptor() ([]byte, []int)
- func (m *InitializeSynchronizationResponse) GetError() string
- func (*InitializeSynchronizationResponse) ProtoMessage()
- func (m *InitializeSynchronizationResponse) Reset()
- func (m *InitializeSynchronizationResponse) String() string
- func (m *InitializeSynchronizationResponse) XXX_DiscardUnknown()
- func (m *InitializeSynchronizationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InitializeSynchronizationResponse) XXX_Merge(src proto.Message)
- func (m *InitializeSynchronizationResponse) XXX_Size() int
- func (m *InitializeSynchronizationResponse) XXX_Unmarshal(b []byte) error
- type PollCompletionRequest
- func (*PollCompletionRequest) Descriptor() ([]byte, []int)
- func (*PollCompletionRequest) ProtoMessage()
- func (m *PollCompletionRequest) Reset()
- func (m *PollCompletionRequest) String() string
- func (m *PollCompletionRequest) XXX_DiscardUnknown()
- func (m *PollCompletionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PollCompletionRequest) XXX_Merge(src proto.Message)
- func (m *PollCompletionRequest) XXX_Size() int
- func (m *PollCompletionRequest) XXX_Unmarshal(b []byte) error
- type PollRequest
- func (*PollRequest) Descriptor() ([]byte, []int)
- func (*PollRequest) ProtoMessage()
- func (m *PollRequest) Reset()
- func (m *PollRequest) String() string
- func (m *PollRequest) XXX_DiscardUnknown()
- func (m *PollRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PollRequest) XXX_Merge(src proto.Message)
- func (m *PollRequest) XXX_Size() int
- func (m *PollRequest) XXX_Unmarshal(b []byte) error
- type PollResponse
- func (*PollResponse) Descriptor() ([]byte, []int)
- func (m *PollResponse) GetError() string
- func (*PollResponse) ProtoMessage()
- func (m *PollResponse) Reset()
- func (m *PollResponse) String() string
- func (m *PollResponse) XXX_DiscardUnknown()
- func (m *PollResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PollResponse) XXX_Merge(src proto.Message)
- func (m *PollResponse) XXX_Size() int
- func (m *PollResponse) XXX_Unmarshal(b []byte) error
- type ScanCompletionRequest
- func (*ScanCompletionRequest) Descriptor() ([]byte, []int)
- func (*ScanCompletionRequest) ProtoMessage()
- func (m *ScanCompletionRequest) Reset()
- func (m *ScanCompletionRequest) String() string
- func (m *ScanCompletionRequest) XXX_DiscardUnknown()
- func (m *ScanCompletionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ScanCompletionRequest) XXX_Merge(src proto.Message)
- func (m *ScanCompletionRequest) XXX_Size() int
- func (m *ScanCompletionRequest) XXX_Unmarshal(b []byte) error
- type ScanRequest
- func (*ScanRequest) Descriptor() ([]byte, []int)
- func (m *ScanRequest) GetBaseSnapshotSignature() *rsync.Signature
- func (m *ScanRequest) GetFull() bool
- func (*ScanRequest) ProtoMessage()
- func (m *ScanRequest) Reset()
- func (m *ScanRequest) String() string
- func (m *ScanRequest) XXX_DiscardUnknown()
- func (m *ScanRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ScanRequest) XXX_Merge(src proto.Message)
- func (m *ScanRequest) XXX_Size() int
- func (m *ScanRequest) XXX_Unmarshal(b []byte) error
- type ScanResponse
- func (*ScanResponse) Descriptor() ([]byte, []int)
- func (m *ScanResponse) GetError() string
- func (m *ScanResponse) GetPreservesExecutability() bool
- func (m *ScanResponse) GetSnapshotDelta() []*rsync.Operation
- func (m *ScanResponse) GetTryAgain() bool
- func (*ScanResponse) ProtoMessage()
- func (m *ScanResponse) Reset()
- func (m *ScanResponse) String() string
- func (m *ScanResponse) XXX_DiscardUnknown()
- func (m *ScanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ScanResponse) XXX_Merge(src proto.Message)
- func (m *ScanResponse) XXX_Size() int
- func (m *ScanResponse) XXX_Unmarshal(b []byte) error
- type StageRequest
- func (*StageRequest) Descriptor() ([]byte, []int)
- func (m *StageRequest) GetDigests() [][]byte
- func (m *StageRequest) GetPaths() []string
- func (*StageRequest) ProtoMessage()
- func (m *StageRequest) Reset()
- func (m *StageRequest) String() string
- func (m *StageRequest) XXX_DiscardUnknown()
- func (m *StageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StageRequest) XXX_Merge(src proto.Message)
- func (m *StageRequest) XXX_Size() int
- func (m *StageRequest) XXX_Unmarshal(b []byte) error
- type StageResponse
- func (*StageResponse) Descriptor() ([]byte, []int)
- func (m *StageResponse) GetError() string
- func (m *StageResponse) GetPaths() []string
- func (m *StageResponse) GetSignatures() []*rsync.Signature
- func (*StageResponse) ProtoMessage()
- func (m *StageResponse) Reset()
- func (m *StageResponse) String() string
- func (m *StageResponse) XXX_DiscardUnknown()
- func (m *StageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StageResponse) XXX_Merge(src proto.Message)
- func (m *StageResponse) XXX_Size() int
- func (m *StageResponse) XXX_Unmarshal(b []byte) error
- type SupplyRequest
- func (*SupplyRequest) Descriptor() ([]byte, []int)
- func (m *SupplyRequest) GetPaths() []string
- func (m *SupplyRequest) GetSignatures() []*rsync.Signature
- func (*SupplyRequest) ProtoMessage()
- func (m *SupplyRequest) Reset()
- func (m *SupplyRequest) String() string
- func (m *SupplyRequest) XXX_DiscardUnknown()
- func (m *SupplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SupplyRequest) XXX_Merge(src proto.Message)
- func (m *SupplyRequest) XXX_Size() int
- func (m *SupplyRequest) XXX_Unmarshal(b []byte) error
- type TransitionCompletionRequest
- func (*TransitionCompletionRequest) Descriptor() ([]byte, []int)
- func (*TransitionCompletionRequest) ProtoMessage()
- func (m *TransitionCompletionRequest) Reset()
- func (m *TransitionCompletionRequest) String() string
- func (m *TransitionCompletionRequest) XXX_DiscardUnknown()
- func (m *TransitionCompletionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TransitionCompletionRequest) XXX_Merge(src proto.Message)
- func (m *TransitionCompletionRequest) XXX_Size() int
- func (m *TransitionCompletionRequest) XXX_Unmarshal(b []byte) error
- type TransitionRequest
- func (*TransitionRequest) Descriptor() ([]byte, []int)
- func (m *TransitionRequest) GetTransitions() []*core.Change
- func (*TransitionRequest) ProtoMessage()
- func (m *TransitionRequest) Reset()
- func (m *TransitionRequest) String() string
- func (m *TransitionRequest) XXX_DiscardUnknown()
- func (m *TransitionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TransitionRequest) XXX_Merge(src proto.Message)
- func (m *TransitionRequest) XXX_Size() int
- func (m *TransitionRequest) XXX_Unmarshal(b []byte) error
- type TransitionResponse
- func (*TransitionResponse) Descriptor() ([]byte, []int)
- func (m *TransitionResponse) GetError() string
- func (m *TransitionResponse) GetProblems() []*core.Problem
- func (m *TransitionResponse) GetResults() []*core.Archive
- func (m *TransitionResponse) GetStagerMissingFiles() bool
- func (*TransitionResponse) ProtoMessage()
- func (m *TransitionResponse) Reset()
- func (m *TransitionResponse) String() string
- func (m *TransitionResponse) XXX_DiscardUnknown()
- func (m *TransitionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TransitionResponse) XXX_Merge(src proto.Message)
- func (m *TransitionResponse) XXX_Size() int
- func (m *TransitionResponse) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEndpoint ¶ added in v0.11.2
func NewEndpoint( connection net.Conn, root string, session string, version synchronization.Version, configuration *synchronization.Configuration, alpha bool, ) (synchronization.Endpoint, error)
NewEndpoint creates a new remote synchronization.Endpoint operating over the specified connection with the specified metadata. If this function fails, then the provided connection will be closed. Once the endpoint has been established, the underlying connection is owned by that endpoint and will be closed when the endpoint is shut down.
func ServeEndpoint ¶
func ServeEndpoint(logger *logging.Logger, connection net.Conn, options ...EndpointServerOption) error
ServeEndpoint creates and serves a endpoint server on the specified connection. It enforces that the provided connection is closed by the time this function returns, regardless of failure.
Types ¶
type EndpointConnectionValidator ¶
type EndpointConnectionValidator func(string, string, synchronization.Version, *synchronization.Configuration, bool) error
EndpointConnectionValidator is a validator function type for validating endpoint server connections. It is passed the session root, identifier, version, configuration, and role information provided by the connection. If it returns a non-nil error, the connection will be terminated before serving begins. The validator should not mutate the provided configuration. The provided root and configuration passed to the validation function will take into account any overrides specified by endpoint server options.
type EndpointRequest ¶
type EndpointRequest struct { // Poll represents a poll request. Poll *PollRequest `protobuf:"bytes,1,opt,name=poll,proto3" json:"poll,omitempty"` // Scan represents a scan request. Scan *ScanRequest `protobuf:"bytes,2,opt,name=scan,proto3" json:"scan,omitempty"` // Stage represents a stage request. Stage *StageRequest `protobuf:"bytes,3,opt,name=stage,proto3" json:"stage,omitempty"` // Supply represents a supply request. Supply *SupplyRequest `protobuf:"bytes,4,opt,name=supply,proto3" json:"supply,omitempty"` // Transition represents a transition request. Transition *TransitionRequest `protobuf:"bytes,5,opt,name=transition,proto3" json:"transition,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
EndpointRequest is a sum type that can transmit any type of endpoint request. Only the sent request will be non-nil. We intentionally avoid using Protocol Buffers' oneof feature because it generates really ugly code and an unwieldy API, at least in Go. Manually checking for exclusivity is not difficult.
func (*EndpointRequest) Descriptor ¶
func (*EndpointRequest) Descriptor() ([]byte, []int)
func (*EndpointRequest) GetPoll ¶
func (m *EndpointRequest) GetPoll() *PollRequest
func (*EndpointRequest) GetScan ¶
func (m *EndpointRequest) GetScan() *ScanRequest
func (*EndpointRequest) GetStage ¶
func (m *EndpointRequest) GetStage() *StageRequest
func (*EndpointRequest) GetSupply ¶
func (m *EndpointRequest) GetSupply() *SupplyRequest
func (*EndpointRequest) GetTransition ¶
func (m *EndpointRequest) GetTransition() *TransitionRequest
func (*EndpointRequest) ProtoMessage ¶
func (*EndpointRequest) ProtoMessage()
func (*EndpointRequest) Reset ¶
func (m *EndpointRequest) Reset()
func (*EndpointRequest) String ¶
func (m *EndpointRequest) String() string
func (*EndpointRequest) XXX_DiscardUnknown ¶
func (m *EndpointRequest) XXX_DiscardUnknown()
func (*EndpointRequest) XXX_Marshal ¶
func (m *EndpointRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EndpointRequest) XXX_Merge ¶
func (m *EndpointRequest) XXX_Merge(src proto.Message)
func (*EndpointRequest) XXX_Size ¶
func (m *EndpointRequest) XXX_Size() int
func (*EndpointRequest) XXX_Unmarshal ¶
func (m *EndpointRequest) XXX_Unmarshal(b []byte) error
type EndpointServerOption ¶
type EndpointServerOption interface {
// contains filtered or unexported methods
}
EndpointServerOption is the interface for specifying endpoint server options. It cannot be constructed or implemented directly, only by one of option constructors provided by this package.
func WithConfiguration ¶
func WithConfiguration(configuration *synchronization.Configuration) EndpointServerOption
WithConfiguration allows for overriding certain endpoint-specific parameters. The provided Configuration object will be validated to ensure that that it only overrides parameters which are valid to override on an endpoint-specific basis.
func WithConnectionValidator ¶
func WithConnectionValidator(validator EndpointConnectionValidator) EndpointServerOption
WithConnectionValidator tells the endpoint server to validate the received session information with the specified callback. If this validation fails (i.e. if the validator returns an error), serving is terminated.
func WithEndpointOption ¶
func WithEndpointOption(option local.EndpointOption) EndpointServerOption
WithEndpointOption tells the endpoint server to pass the provided endpoint option to the underlying endpoint instance.
func WithRoot ¶
func WithRoot(root string) EndpointServerOption
WithRoot tells the endpoint server to override the incoming root path with the specified path. This will be required for custom endpoint servers, where the root passed to the server from the client controller will be empty (and hence invalid).
type InitializeSynchronizationRequest ¶
type InitializeSynchronizationRequest struct { // Session is the session identifier. Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` // Version is the session version. Version synchronization.Version `protobuf:"varint,2,opt,name=version,proto3,enum=synchronization.Version" json:"version,omitempty"` // Configuration is the session configuration. Configuration *synchronization.Configuration `protobuf:"bytes,3,opt,name=configuration,proto3" json:"configuration,omitempty"` // Root is the synchronization root path. Root string `protobuf:"bytes,4,opt,name=root,proto3" json:"root,omitempty"` // Alpha indicates whether or not the endpoint should behave as alpha (as // opposed to beta). Alpha bool `protobuf:"varint,5,opt,name=alpha,proto3" json:"alpha,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
InitializeSynchronizationRequest encodes a request for endpoint initialization.
func (*InitializeSynchronizationRequest) Descriptor ¶
func (*InitializeSynchronizationRequest) Descriptor() ([]byte, []int)
func (*InitializeSynchronizationRequest) GetAlpha ¶
func (m *InitializeSynchronizationRequest) GetAlpha() bool
func (*InitializeSynchronizationRequest) GetConfiguration ¶
func (m *InitializeSynchronizationRequest) GetConfiguration() *synchronization.Configuration
func (*InitializeSynchronizationRequest) GetRoot ¶
func (m *InitializeSynchronizationRequest) GetRoot() string
func (*InitializeSynchronizationRequest) GetSession ¶
func (m *InitializeSynchronizationRequest) GetSession() string
func (*InitializeSynchronizationRequest) GetVersion ¶
func (m *InitializeSynchronizationRequest) GetVersion() synchronization.Version
func (*InitializeSynchronizationRequest) ProtoMessage ¶
func (*InitializeSynchronizationRequest) ProtoMessage()
func (*InitializeSynchronizationRequest) Reset ¶
func (m *InitializeSynchronizationRequest) Reset()
func (*InitializeSynchronizationRequest) String ¶
func (m *InitializeSynchronizationRequest) String() string
func (*InitializeSynchronizationRequest) XXX_DiscardUnknown ¶
func (m *InitializeSynchronizationRequest) XXX_DiscardUnknown()
func (*InitializeSynchronizationRequest) XXX_Marshal ¶
func (m *InitializeSynchronizationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InitializeSynchronizationRequest) XXX_Merge ¶
func (m *InitializeSynchronizationRequest) XXX_Merge(src proto.Message)
func (*InitializeSynchronizationRequest) XXX_Size ¶
func (m *InitializeSynchronizationRequest) XXX_Size() int
func (*InitializeSynchronizationRequest) XXX_Unmarshal ¶
func (m *InitializeSynchronizationRequest) XXX_Unmarshal(b []byte) error
type InitializeSynchronizationResponse ¶
type InitializeSynchronizationResponse struct { // Error is the error message (if any) resulting from initialization. Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
InitializeSynchronizationResponse encodes initialization results.
func (*InitializeSynchronizationResponse) Descriptor ¶
func (*InitializeSynchronizationResponse) Descriptor() ([]byte, []int)
func (*InitializeSynchronizationResponse) GetError ¶
func (m *InitializeSynchronizationResponse) GetError() string
func (*InitializeSynchronizationResponse) ProtoMessage ¶
func (*InitializeSynchronizationResponse) ProtoMessage()
func (*InitializeSynchronizationResponse) Reset ¶
func (m *InitializeSynchronizationResponse) Reset()
func (*InitializeSynchronizationResponse) String ¶
func (m *InitializeSynchronizationResponse) String() string
func (*InitializeSynchronizationResponse) XXX_DiscardUnknown ¶
func (m *InitializeSynchronizationResponse) XXX_DiscardUnknown()
func (*InitializeSynchronizationResponse) XXX_Marshal ¶
func (m *InitializeSynchronizationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InitializeSynchronizationResponse) XXX_Merge ¶
func (m *InitializeSynchronizationResponse) XXX_Merge(src proto.Message)
func (*InitializeSynchronizationResponse) XXX_Size ¶
func (m *InitializeSynchronizationResponse) XXX_Size() int
func (*InitializeSynchronizationResponse) XXX_Unmarshal ¶
func (m *InitializeSynchronizationResponse) XXX_Unmarshal(b []byte) error
type PollCompletionRequest ¶
type PollCompletionRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
PollCompletionRequest is paired with PollRequest and indicates a request for early polling completion or an acknowledgement of completion.
func (*PollCompletionRequest) Descriptor ¶
func (*PollCompletionRequest) Descriptor() ([]byte, []int)
func (*PollCompletionRequest) ProtoMessage ¶
func (*PollCompletionRequest) ProtoMessage()
func (*PollCompletionRequest) Reset ¶
func (m *PollCompletionRequest) Reset()
func (*PollCompletionRequest) String ¶
func (m *PollCompletionRequest) String() string
func (*PollCompletionRequest) XXX_DiscardUnknown ¶
func (m *PollCompletionRequest) XXX_DiscardUnknown()
func (*PollCompletionRequest) XXX_Marshal ¶
func (m *PollCompletionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PollCompletionRequest) XXX_Merge ¶
func (m *PollCompletionRequest) XXX_Merge(src proto.Message)
func (*PollCompletionRequest) XXX_Size ¶
func (m *PollCompletionRequest) XXX_Size() int
func (*PollCompletionRequest) XXX_Unmarshal ¶
func (m *PollCompletionRequest) XXX_Unmarshal(b []byte) error
type PollRequest ¶
type PollRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
PollRequest encodes a request for one-shot polling.
func (*PollRequest) Descriptor ¶
func (*PollRequest) Descriptor() ([]byte, []int)
func (*PollRequest) ProtoMessage ¶
func (*PollRequest) ProtoMessage()
func (*PollRequest) Reset ¶
func (m *PollRequest) Reset()
func (*PollRequest) String ¶
func (m *PollRequest) String() string
func (*PollRequest) XXX_DiscardUnknown ¶
func (m *PollRequest) XXX_DiscardUnknown()
func (*PollRequest) XXX_Marshal ¶
func (m *PollRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PollRequest) XXX_Merge ¶
func (m *PollRequest) XXX_Merge(src proto.Message)
func (*PollRequest) XXX_Size ¶
func (m *PollRequest) XXX_Size() int
func (*PollRequest) XXX_Unmarshal ¶
func (m *PollRequest) XXX_Unmarshal(b []byte) error
type PollResponse ¶
type PollResponse struct { // Error is the error message (if any) resulting from polling. Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
PollResponse indicates polling completion.
func (*PollResponse) Descriptor ¶
func (*PollResponse) Descriptor() ([]byte, []int)
func (*PollResponse) GetError ¶
func (m *PollResponse) GetError() string
func (*PollResponse) ProtoMessage ¶
func (*PollResponse) ProtoMessage()
func (*PollResponse) Reset ¶
func (m *PollResponse) Reset()
func (*PollResponse) String ¶
func (m *PollResponse) String() string
func (*PollResponse) XXX_DiscardUnknown ¶
func (m *PollResponse) XXX_DiscardUnknown()
func (*PollResponse) XXX_Marshal ¶
func (m *PollResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PollResponse) XXX_Merge ¶
func (m *PollResponse) XXX_Merge(src proto.Message)
func (*PollResponse) XXX_Size ¶
func (m *PollResponse) XXX_Size() int
func (*PollResponse) XXX_Unmarshal ¶
func (m *PollResponse) XXX_Unmarshal(b []byte) error
type ScanCompletionRequest ¶ added in v0.11.0
type ScanCompletionRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ScanCompletionRequest is paired with a ScanRequest and indicates a request for scan cancellation or an acknowledgement of completion.
func (*ScanCompletionRequest) Descriptor ¶ added in v0.11.0
func (*ScanCompletionRequest) Descriptor() ([]byte, []int)
func (*ScanCompletionRequest) ProtoMessage ¶ added in v0.11.0
func (*ScanCompletionRequest) ProtoMessage()
func (*ScanCompletionRequest) Reset ¶ added in v0.11.0
func (m *ScanCompletionRequest) Reset()
func (*ScanCompletionRequest) String ¶ added in v0.11.0
func (m *ScanCompletionRequest) String() string
func (*ScanCompletionRequest) XXX_DiscardUnknown ¶ added in v0.11.0
func (m *ScanCompletionRequest) XXX_DiscardUnknown()
func (*ScanCompletionRequest) XXX_Marshal ¶ added in v0.11.0
func (m *ScanCompletionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ScanCompletionRequest) XXX_Merge ¶ added in v0.11.0
func (m *ScanCompletionRequest) XXX_Merge(src proto.Message)
func (*ScanCompletionRequest) XXX_Size ¶ added in v0.11.0
func (m *ScanCompletionRequest) XXX_Size() int
func (*ScanCompletionRequest) XXX_Unmarshal ¶ added in v0.11.0
func (m *ScanCompletionRequest) XXX_Unmarshal(b []byte) error
type ScanRequest ¶
type ScanRequest struct { // BaseSnapshotSignature is the rsync signature to use as the base for // differentially transmitting snapshots. BaseSnapshotSignature *rsync.Signature `protobuf:"bytes,1,opt,name=baseSnapshotSignature,proto3" json:"baseSnapshotSignature,omitempty"` // Full indicates whether or not to force a full (warm) scan, temporarily // avoiding any acceleration that might be available on the endpoint. Full bool `protobuf:"varint,2,opt,name=full,proto3" json:"full,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ScanRequest encodes a request for a scan.
func (*ScanRequest) Descriptor ¶
func (*ScanRequest) Descriptor() ([]byte, []int)
func (*ScanRequest) GetBaseSnapshotSignature ¶
func (m *ScanRequest) GetBaseSnapshotSignature() *rsync.Signature
func (*ScanRequest) GetFull ¶
func (m *ScanRequest) GetFull() bool
func (*ScanRequest) ProtoMessage ¶
func (*ScanRequest) ProtoMessage()
func (*ScanRequest) Reset ¶
func (m *ScanRequest) Reset()
func (*ScanRequest) String ¶
func (m *ScanRequest) String() string
func (*ScanRequest) XXX_DiscardUnknown ¶
func (m *ScanRequest) XXX_DiscardUnknown()
func (*ScanRequest) XXX_Marshal ¶
func (m *ScanRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ScanRequest) XXX_Merge ¶
func (m *ScanRequest) XXX_Merge(src proto.Message)
func (*ScanRequest) XXX_Size ¶
func (m *ScanRequest) XXX_Size() int
func (*ScanRequest) XXX_Unmarshal ¶
func (m *ScanRequest) XXX_Unmarshal(b []byte) error
type ScanResponse ¶
type ScanResponse struct { // SnapshotDelta are the operations need to reconstruct the snapshot against // the specified base. SnapshotDelta []*rsync.Operation `protobuf:"bytes,1,rep,name=snapshotDelta,proto3" json:"snapshotDelta,omitempty"` // PreservesExecutability indicates whether or not the scan root preserves // POSIX executability bits. PreservesExecutability bool `protobuf:"varint,2,opt,name=preservesExecutability,proto3" json:"preservesExecutability,omitempty"` // Error is the error message (if any) resulting from scanning. Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // TryAgain indicates whether or not the error is ephermeral. TryAgain bool `protobuf:"varint,4,opt,name=tryAgain,proto3" json:"tryAgain,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ScanResponse encodes the results of a scan.
func (*ScanResponse) Descriptor ¶
func (*ScanResponse) Descriptor() ([]byte, []int)
func (*ScanResponse) GetError ¶
func (m *ScanResponse) GetError() string
func (*ScanResponse) GetPreservesExecutability ¶
func (m *ScanResponse) GetPreservesExecutability() bool
func (*ScanResponse) GetSnapshotDelta ¶
func (m *ScanResponse) GetSnapshotDelta() []*rsync.Operation
func (*ScanResponse) GetTryAgain ¶
func (m *ScanResponse) GetTryAgain() bool
func (*ScanResponse) ProtoMessage ¶
func (*ScanResponse) ProtoMessage()
func (*ScanResponse) Reset ¶
func (m *ScanResponse) Reset()
func (*ScanResponse) String ¶
func (m *ScanResponse) String() string
func (*ScanResponse) XXX_DiscardUnknown ¶
func (m *ScanResponse) XXX_DiscardUnknown()
func (*ScanResponse) XXX_Marshal ¶
func (m *ScanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ScanResponse) XXX_Merge ¶
func (m *ScanResponse) XXX_Merge(src proto.Message)
func (*ScanResponse) XXX_Size ¶
func (m *ScanResponse) XXX_Size() int
func (*ScanResponse) XXX_Unmarshal ¶
func (m *ScanResponse) XXX_Unmarshal(b []byte) error
type StageRequest ¶
type StageRequest struct { // Paths lists the paths that need to be staged. Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"` // Digests lists the digests for the paths that need to be staged. Its // length and contents correspond to that of Paths. Digests [][]byte `protobuf:"bytes,2,rep,name=digests,proto3" json:"digests,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
StageRequest encodes a request for staging.
func (*StageRequest) Descriptor ¶
func (*StageRequest) Descriptor() ([]byte, []int)
func (*StageRequest) GetDigests ¶
func (m *StageRequest) GetDigests() [][]byte
func (*StageRequest) GetPaths ¶
func (m *StageRequest) GetPaths() []string
func (*StageRequest) ProtoMessage ¶
func (*StageRequest) ProtoMessage()
func (*StageRequest) Reset ¶
func (m *StageRequest) Reset()
func (*StageRequest) String ¶
func (m *StageRequest) String() string
func (*StageRequest) XXX_DiscardUnknown ¶
func (m *StageRequest) XXX_DiscardUnknown()
func (*StageRequest) XXX_Marshal ¶
func (m *StageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StageRequest) XXX_Merge ¶
func (m *StageRequest) XXX_Merge(src proto.Message)
func (*StageRequest) XXX_Size ¶
func (m *StageRequest) XXX_Size() int
func (*StageRequest) XXX_Unmarshal ¶
func (m *StageRequest) XXX_Unmarshal(b []byte) error
type StageResponse ¶
type StageResponse struct { // Paths are the paths that need to be staged (relative to the // synchronization root). Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"` // Signatures are the rsync signatures of the paths needing to be staged. Signatures []*rsync.Signature `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"` // Error is the error message (if any) resulting from staging // initialization. Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
StageResponse encodes the results of staging initialization.
func (*StageResponse) Descriptor ¶
func (*StageResponse) Descriptor() ([]byte, []int)
func (*StageResponse) GetError ¶
func (m *StageResponse) GetError() string
func (*StageResponse) GetPaths ¶
func (m *StageResponse) GetPaths() []string
func (*StageResponse) GetSignatures ¶
func (m *StageResponse) GetSignatures() []*rsync.Signature
func (*StageResponse) ProtoMessage ¶
func (*StageResponse) ProtoMessage()
func (*StageResponse) Reset ¶
func (m *StageResponse) Reset()
func (*StageResponse) String ¶
func (m *StageResponse) String() string
func (*StageResponse) XXX_DiscardUnknown ¶
func (m *StageResponse) XXX_DiscardUnknown()
func (*StageResponse) XXX_Marshal ¶
func (m *StageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StageResponse) XXX_Merge ¶
func (m *StageResponse) XXX_Merge(src proto.Message)
func (*StageResponse) XXX_Size ¶
func (m *StageResponse) XXX_Size() int
func (*StageResponse) XXX_Unmarshal ¶
func (m *StageResponse) XXX_Unmarshal(b []byte) error
type SupplyRequest ¶
type SupplyRequest struct { // Paths are the paths to provide (relative to the synchronization root). Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"` // Signatures are the rsync signatures of the paths needing to be staged. Signatures []*rsync.Signature `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
SupplyRequest indicates a request for supplying files.
func (*SupplyRequest) Descriptor ¶
func (*SupplyRequest) Descriptor() ([]byte, []int)
func (*SupplyRequest) GetPaths ¶
func (m *SupplyRequest) GetPaths() []string
func (*SupplyRequest) GetSignatures ¶
func (m *SupplyRequest) GetSignatures() []*rsync.Signature
func (*SupplyRequest) ProtoMessage ¶
func (*SupplyRequest) ProtoMessage()
func (*SupplyRequest) Reset ¶
func (m *SupplyRequest) Reset()
func (*SupplyRequest) String ¶
func (m *SupplyRequest) String() string
func (*SupplyRequest) XXX_DiscardUnknown ¶
func (m *SupplyRequest) XXX_DiscardUnknown()
func (*SupplyRequest) XXX_Marshal ¶
func (m *SupplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SupplyRequest) XXX_Merge ¶
func (m *SupplyRequest) XXX_Merge(src proto.Message)
func (*SupplyRequest) XXX_Size ¶
func (m *SupplyRequest) XXX_Size() int
func (*SupplyRequest) XXX_Unmarshal ¶
func (m *SupplyRequest) XXX_Unmarshal(b []byte) error
type TransitionCompletionRequest ¶ added in v0.11.0
type TransitionCompletionRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TransitionCompletionRequest is paired with a TransitionRequest and indicates a request for transition cancellation or an acknowledgement of completion.
func (*TransitionCompletionRequest) Descriptor ¶ added in v0.11.0
func (*TransitionCompletionRequest) Descriptor() ([]byte, []int)
func (*TransitionCompletionRequest) ProtoMessage ¶ added in v0.11.0
func (*TransitionCompletionRequest) ProtoMessage()
func (*TransitionCompletionRequest) Reset ¶ added in v0.11.0
func (m *TransitionCompletionRequest) Reset()
func (*TransitionCompletionRequest) String ¶ added in v0.11.0
func (m *TransitionCompletionRequest) String() string
func (*TransitionCompletionRequest) XXX_DiscardUnknown ¶ added in v0.11.0
func (m *TransitionCompletionRequest) XXX_DiscardUnknown()
func (*TransitionCompletionRequest) XXX_Marshal ¶ added in v0.11.0
func (m *TransitionCompletionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TransitionCompletionRequest) XXX_Merge ¶ added in v0.11.0
func (m *TransitionCompletionRequest) XXX_Merge(src proto.Message)
func (*TransitionCompletionRequest) XXX_Size ¶ added in v0.11.0
func (m *TransitionCompletionRequest) XXX_Size() int
func (*TransitionCompletionRequest) XXX_Unmarshal ¶ added in v0.11.0
func (m *TransitionCompletionRequest) XXX_Unmarshal(b []byte) error
type TransitionRequest ¶
type TransitionRequest struct { // Transitions are the transitions that need to be applied. Transitions []*core.Change `protobuf:"bytes,1,rep,name=transitions,proto3" json:"transitions,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TransitionRequest encodes a request for transition application.
func (*TransitionRequest) Descriptor ¶
func (*TransitionRequest) Descriptor() ([]byte, []int)
func (*TransitionRequest) GetTransitions ¶
func (m *TransitionRequest) GetTransitions() []*core.Change
func (*TransitionRequest) ProtoMessage ¶
func (*TransitionRequest) ProtoMessage()
func (*TransitionRequest) Reset ¶
func (m *TransitionRequest) Reset()
func (*TransitionRequest) String ¶
func (m *TransitionRequest) String() string
func (*TransitionRequest) XXX_DiscardUnknown ¶
func (m *TransitionRequest) XXX_DiscardUnknown()
func (*TransitionRequest) XXX_Marshal ¶
func (m *TransitionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TransitionRequest) XXX_Merge ¶
func (m *TransitionRequest) XXX_Merge(src proto.Message)
func (*TransitionRequest) XXX_Size ¶
func (m *TransitionRequest) XXX_Size() int
func (*TransitionRequest) XXX_Unmarshal ¶
func (m *TransitionRequest) XXX_Unmarshal(b []byte) error
type TransitionResponse ¶
type TransitionResponse struct { // Results are the resulting contents post-transition. // HACK: We have to use Archive to wrap our Entry results here because // Protocol Buffers won't encode a nil pointer in a repeated element in // certain cases, and the results of transitions may very well be nil. gob // also exhibits this problem. Results []*core.Archive `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // Problems are any problems encountered during the transition operation. Problems []*core.Problem `protobuf:"bytes,2,rep,name=problems,proto3" json:"problems,omitempty"` // StagerMissingFiles indicates whether or not the endpoint's stager // indicated missing files during transitioning. StagerMissingFiles bool `protobuf:"varint,3,opt,name=stagerMissingFiles,proto3" json:"stagerMissingFiles,omitempty"` // Error is the error message (if any) resulting from the remote transition // method. This will always be an empty string since transition doesn't // return errors from local endpoints, but to match the endpoint interface // (which allows for transition errors due to network failures with remote // endpoints), we include this field. // TODO: Should we just remove this field? Doing so would rely on knowledge // of localEndpoint's transition behavior. Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TransitionResponse encodes the results of transitioning.
func (*TransitionResponse) Descriptor ¶
func (*TransitionResponse) Descriptor() ([]byte, []int)
func (*TransitionResponse) GetError ¶
func (m *TransitionResponse) GetError() string
func (*TransitionResponse) GetProblems ¶
func (m *TransitionResponse) GetProblems() []*core.Problem
func (*TransitionResponse) GetResults ¶
func (m *TransitionResponse) GetResults() []*core.Archive
func (*TransitionResponse) GetStagerMissingFiles ¶
func (m *TransitionResponse) GetStagerMissingFiles() bool
func (*TransitionResponse) ProtoMessage ¶
func (*TransitionResponse) ProtoMessage()
func (*TransitionResponse) Reset ¶
func (m *TransitionResponse) Reset()
func (*TransitionResponse) String ¶
func (m *TransitionResponse) String() string
func (*TransitionResponse) XXX_DiscardUnknown ¶
func (m *TransitionResponse) XXX_DiscardUnknown()
func (*TransitionResponse) XXX_Marshal ¶
func (m *TransitionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TransitionResponse) XXX_Merge ¶
func (m *TransitionResponse) XXX_Merge(src proto.Message)
func (*TransitionResponse) XXX_Size ¶
func (m *TransitionResponse) XXX_Size() int
func (*TransitionResponse) XXX_Unmarshal ¶
func (m *TransitionResponse) XXX_Unmarshal(b []byte) error