Documentation ¶
Index ¶
- type HealthChecker
- type LocalOverrideStorageDecorator
- type NodeState
- type Option
- func WithAuthorizedKeys(keys [][]byte) Option
- func WithContainerSource(cnrSrc container.Source) Option
- func WithHealthChecker(hc HealthChecker) Option
- func WithKey(key *ecdsa.PrivateKey) Option
- func WithLocalOverrideStorage(localOverrideStorage LocalOverrideStorageDecorator) Option
- func WithLocalStorage(engine *engine.StorageEngine) Option
- func WithNetMapSource(netMapSrc netmap.Source) Option
- func WithNodeState(state NodeState) Option
- func WithReplicator(r *replicator.Replicator) Option
- func WithTreeService(s TreeService) Option
- type Server
- func (s *Server) AddChainLocalOverride(_ context.Context, req *control.AddChainLocalOverrideRequest) (*control.AddChainLocalOverrideResponse, error)
- func (s *Server) DetachShards(_ context.Context, req *control.DetachShardsRequest) (*control.DetachShardsResponse, error)
- func (s *Server) Doctor(ctx context.Context, req *control.DoctorRequest) (*control.DoctorResponse, error)
- func (s *Server) DropObjects(ctx context.Context, req *control.DropObjectsRequest) (*control.DropObjectsResponse, error)
- func (s *Server) EvacuateShard(ctx context.Context, req *control.EvacuateShardRequest) (*control.EvacuateShardResponse, error)
- func (s *Server) FlushCache(ctx context.Context, req *control.FlushCacheRequest) (*control.FlushCacheResponse, error)
- func (s *Server) GetChainLocalOverride(_ context.Context, req *control.GetChainLocalOverrideRequest) (*control.GetChainLocalOverrideResponse, error)
- func (s *Server) GetNetmapStatus(_ context.Context, req *control.GetNetmapStatusRequest) (*control.GetNetmapStatusResponse, error)
- func (s *Server) GetShardEvacuationStatus(ctx context.Context, req *control.GetShardEvacuationStatusRequest) (*control.GetShardEvacuationStatusResponse, error)
- func (s *Server) HealthCheck(_ context.Context, req *control.HealthCheckRequest) (*control.HealthCheckResponse, error)
- func (s *Server) ListChainLocalOverrides(_ context.Context, req *control.ListChainLocalOverridesRequest) (*control.ListChainLocalOverridesResponse, error)
- func (s *Server) ListShards(_ context.Context, req *control.ListShardsRequest) (*control.ListShardsResponse, error)
- func (s *Server) ListTargetsLocalOverrides(_ context.Context, req *control.ListTargetsLocalOverridesRequest) (*control.ListTargetsLocalOverridesResponse, error)
- func (s *Server) RemoveChainLocalOverride(_ context.Context, req *control.RemoveChainLocalOverrideRequest) (*control.RemoveChainLocalOverrideResponse, error)
- func (s *Server) RemoveChainLocalOverridesByTarget(_ context.Context, req *control.RemoveChainLocalOverridesByTargetRequest) (*control.RemoveChainLocalOverridesByTargetResponse, error)
- func (s *Server) ResetShardEvacuationStatus(ctx context.Context, req *control.ResetShardEvacuationStatusRequest) (*control.ResetShardEvacuationStatusResponse, error)
- func (s *Server) SealWriteCache(ctx context.Context, req *control.SealWriteCacheRequest) (*control.SealWriteCacheResponse, error)
- func (s *Server) SetNetmapStatus(_ context.Context, req *control.SetNetmapStatusRequest) (*control.SetNetmapStatusResponse, error)
- func (s *Server) SetShardMode(_ context.Context, req *control.SetShardModeRequest) (*control.SetShardModeResponse, error)
- func (s *Server) StartShardEvacuation(ctx context.Context, req *control.StartShardEvacuationRequest) (*control.StartShardEvacuationResponse, error)
- func (s *Server) StartShardRebuild(ctx context.Context, req *control.StartShardRebuildRequest) (*control.StartShardRebuildResponse, error)
- func (s *Server) StopShardEvacuation(ctx context.Context, req *control.StopShardEvacuationRequest) (*control.StopShardEvacuationResponse, error)
- func (s *Server) SynchronizeTree(ctx context.Context, req *control.SynchronizeTreeRequest) (*control.SynchronizeTreeResponse, error)
- type TreeService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthChecker ¶
type HealthChecker interface { // Must calculate and return current status of the node in FrostFS network map. // // If status can not be calculated for any reason, // control.netmapStatus_STATUS_UNDEFINED should be returned. NetmapStatus() control.NetmapStatus // Must calculate and return current health status of the node application. // // If status can not be calculated for any reason, // control.HealthStatus_HEALTH_STATUS_UNDEFINED should be returned. HealthStatus() control.HealthStatus }
HealthChecker is component interface for calculating the current health status of a node.
type LocalOverrideStorageDecorator ¶ added in v0.38.0
type LocalOverrideStorageDecorator interface { // LocalStorage method can be decorated by using sync primitives in the case if the local // override storage state should be consistent for chain router. LocalStorage() policyengine.LocalOverrideStorage }
LocalOverrideStorageDecorator interface provides methods to decorate LocalOverrideEngine interface methods.
type NodeState ¶
type NodeState interface { // SetNetmapStatus switches the storage node to the given network status. // // If status is control.NetmapStatus_MAINTENANCE and maintenance is allowed // in the network settings, the node additionally starts local maintenance. SetNetmapStatus(st control.NetmapStatus) error // ForceMaintenance works like SetNetmapStatus(control.NetmapStatus_MAINTENANCE) // but starts local maintenance regardless of the network settings. ForceMaintenance() error GetNetmapStatus() (control.NetmapStatus, uint64, error) }
NodeState is an interface of storage node network state.
type Option ¶
type Option func(*cfg)
Option of the Server's constructor.
func WithAuthorizedKeys ¶
WithAuthorizedKeys returns option to add list of public keys that have rights to use Control service.
func WithContainerSource ¶
WithContainerSource returns option to set container storage.
func WithHealthChecker ¶
func WithHealthChecker(hc HealthChecker) Option
WithHealthChecker returns option to set component to calculate node health status.
func WithKey ¶
func WithKey(key *ecdsa.PrivateKey) Option
WithKey returns option to set private key used for signing responses.
func WithLocalOverrideStorage ¶ added in v0.38.0
func WithLocalOverrideStorage(localOverrideStorage LocalOverrideStorageDecorator) Option
WithLocalOverrideStorage returns the option to set access policy engine chain override storage.
func WithLocalStorage ¶
func WithLocalStorage(engine *engine.StorageEngine) Option
WithLocalStorage returns option to set local storage engine that contains information about shards.
func WithNetMapSource ¶
WithNetMapSource returns option to set network map storage.
func WithNodeState ¶
WithNodeState returns option to set node network state component.
func WithReplicator ¶
func WithReplicator(r *replicator.Replicator) Option
WithReplicator returns option to set network map storage.
func WithTreeService ¶
func WithTreeService(s TreeService) Option
WithTreeService returns an option to set tree service.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an entity that serves Control service on storage node.
func (*Server) AddChainLocalOverride ¶ added in v0.38.0
func (s *Server) AddChainLocalOverride(_ context.Context, req *control.AddChainLocalOverrideRequest) (*control.AddChainLocalOverrideResponse, error)
func (*Server) DetachShards ¶ added in v0.38.0
func (s *Server) DetachShards(_ context.Context, req *control.DetachShardsRequest) (*control.DetachShardsResponse, error)
func (*Server) Doctor ¶
func (s *Server) Doctor(ctx context.Context, req *control.DoctorRequest) (*control.DoctorResponse, error)
func (*Server) DropObjects ¶
func (s *Server) DropObjects(ctx context.Context, req *control.DropObjectsRequest) (*control.DropObjectsResponse, error)
DropObjects marks objects to be removed from the local node.
Objects are marked via garbage collector's callback.
If some address is not a valid object address in a binary format, an error returns. If request is unsigned or signed by disallowed key, permission error returns.
func (*Server) EvacuateShard ¶
func (s *Server) EvacuateShard(ctx context.Context, req *control.EvacuateShardRequest) (*control.EvacuateShardResponse, error)
func (*Server) FlushCache ¶
func (s *Server) FlushCache(ctx context.Context, req *control.FlushCacheRequest) (*control.FlushCacheResponse, error)
func (*Server) GetChainLocalOverride ¶ added in v0.38.0
func (s *Server) GetChainLocalOverride(_ context.Context, req *control.GetChainLocalOverrideRequest) (*control.GetChainLocalOverrideResponse, error)
func (*Server) GetNetmapStatus ¶ added in v0.42.0
func (s *Server) GetNetmapStatus(_ context.Context, req *control.GetNetmapStatusRequest) (*control.GetNetmapStatusResponse, error)
GetNetmapStatus gets node status in FrostFS network.
func (*Server) GetShardEvacuationStatus ¶ added in v0.37.0
func (s *Server) GetShardEvacuationStatus(ctx context.Context, req *control.GetShardEvacuationStatusRequest) (*control.GetShardEvacuationStatusResponse, error)
func (*Server) HealthCheck ¶
func (s *Server) HealthCheck(_ context.Context, req *control.HealthCheckRequest) (*control.HealthCheckResponse, error)
HealthCheck returns health status of the local node.
If request is unsigned or signed by disallowed key, permission error returns.
func (*Server) ListChainLocalOverrides ¶ added in v0.38.0
func (s *Server) ListChainLocalOverrides(_ context.Context, req *control.ListChainLocalOverridesRequest) (*control.ListChainLocalOverridesResponse, error)
func (*Server) ListShards ¶
func (s *Server) ListShards(_ context.Context, req *control.ListShardsRequest) (*control.ListShardsResponse, error)
func (*Server) ListTargetsLocalOverrides ¶ added in v0.38.0
func (s *Server) ListTargetsLocalOverrides(_ context.Context, req *control.ListTargetsLocalOverridesRequest) (*control.ListTargetsLocalOverridesResponse, error)
func (*Server) RemoveChainLocalOverride ¶ added in v0.38.0
func (s *Server) RemoveChainLocalOverride(_ context.Context, req *control.RemoveChainLocalOverrideRequest) (*control.RemoveChainLocalOverrideResponse, error)
func (*Server) RemoveChainLocalOverridesByTarget ¶ added in v0.38.0
func (s *Server) RemoveChainLocalOverridesByTarget(_ context.Context, req *control.RemoveChainLocalOverridesByTargetRequest) (*control.RemoveChainLocalOverridesByTargetResponse, error)
func (*Server) ResetShardEvacuationStatus ¶ added in v0.38.0
func (s *Server) ResetShardEvacuationStatus(ctx context.Context, req *control.ResetShardEvacuationStatusRequest) (*control.ResetShardEvacuationStatusResponse, error)
func (*Server) SealWriteCache ¶ added in v0.38.0
func (s *Server) SealWriteCache(ctx context.Context, req *control.SealWriteCacheRequest) (*control.SealWriteCacheResponse, error)
func (*Server) SetNetmapStatus ¶
func (s *Server) SetNetmapStatus(_ context.Context, req *control.SetNetmapStatusRequest) (*control.SetNetmapStatusResponse, error)
SetNetmapStatus sets node status in FrostFS network.
If request is unsigned or signed by disallowed key, permission error returns.
func (*Server) SetShardMode ¶
func (s *Server) SetShardMode(_ context.Context, req *control.SetShardModeRequest) (*control.SetShardModeResponse, error)
func (*Server) StartShardEvacuation ¶ added in v0.37.0
func (s *Server) StartShardEvacuation(ctx context.Context, req *control.StartShardEvacuationRequest) (*control.StartShardEvacuationResponse, error)
func (*Server) StartShardRebuild ¶ added in v0.43.0
func (s *Server) StartShardRebuild(ctx context.Context, req *control.StartShardRebuildRequest) (*control.StartShardRebuildResponse, error)
func (*Server) StopShardEvacuation ¶ added in v0.37.0
func (s *Server) StopShardEvacuation(ctx context.Context, req *control.StopShardEvacuationRequest) (*control.StopShardEvacuationResponse, error)
func (*Server) SynchronizeTree ¶
func (s *Server) SynchronizeTree(ctx context.Context, req *control.SynchronizeTreeRequest) (*control.SynchronizeTreeResponse, error)