Documentation
¶
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type AccessKey
- func (s *AccessKey) Decode(d *jx.Decoder) error
- func (s *AccessKey) Encode(e *jx.Encoder)
- func (s *AccessKey) GetAccessKey() string
- func (s *AccessKey) GetCreatedAt() OptDateTime
- func (s *AccessKey) GetGrants() []Grant
- func (s *AccessKey) GetSource() Source
- func (s *AccessKey) MarshalJSON() ([]byte, error)
- func (s *AccessKey) SetAccessKey(val string)
- func (s *AccessKey) SetCreatedAt(val OptDateTime)
- func (s *AccessKey) SetGrants(val []Grant)
- func (s *AccessKey) SetSource(val Source)
- func (s *AccessKey) UnmarshalJSON(data []byte) error
- func (s *AccessKey) Validate() error
- type AccessKeyList
- func (s *AccessKeyList) Decode(d *jx.Decoder) error
- func (s *AccessKeyList) Encode(e *jx.Encoder)
- func (s *AccessKeyList) GetKeys() []AccessKey
- func (s *AccessKeyList) MarshalJSON() ([]byte, error)
- func (s *AccessKeyList) SetKeys(val []AccessKey)
- func (s *AccessKeyList) UnmarshalJSON(data []byte) error
- func (s *AccessKeyList) Validate() error
- type Client
- func (c *Client) ControlRebalance(ctx context.Context, request *RebalanceControlRequest) (*RebalanceStatus, error)
- func (c *Client) CreateAccessKey(ctx context.Context, request *CreateAccessKeyRequest) (*CreatedAccessKey, error)
- func (c *Client) DeleteAccessKey(ctx context.Context, params DeleteAccessKeyParams) error
- func (c *Client) GetClusterStatus(ctx context.Context) (*ClusterStatus, error)
- func (c *Client) GetInfo(ctx context.Context) (*InstanceInfo, error)
- func (c *Client) GetRebalanceStatus(ctx context.Context) (*RebalanceStatus, error)
- func (c *Client) ListAccessKeys(ctx context.Context) (*AccessKeyList, error)
- func (c *Client) ReloadConfig(ctx context.Context) (*ReloadResult, error)
- type ClientOption
- type ClusterDisk
- func (s *ClusterDisk) Decode(d *jx.Decoder) error
- func (s *ClusterDisk) Encode(e *jx.Encoder)
- func (s *ClusterDisk) GetFreeBytes() OptInt64
- func (s *ClusterDisk) GetFullness() OptFloat64
- func (s *ClusterDisk) GetID() string
- func (s *ClusterDisk) GetTotalBytes() OptInt64
- func (s *ClusterDisk) GetWeight() float64
- func (s *ClusterDisk) MarshalJSON() ([]byte, error)
- func (s *ClusterDisk) SetFreeBytes(val OptInt64)
- func (s *ClusterDisk) SetFullness(val OptFloat64)
- func (s *ClusterDisk) SetID(val string)
- func (s *ClusterDisk) SetTotalBytes(val OptInt64)
- func (s *ClusterDisk) SetWeight(val float64)
- func (s *ClusterDisk) UnmarshalJSON(data []byte) error
- func (s *ClusterDisk) Validate() error
- type ClusterNode
- func (s *ClusterNode) Decode(d *jx.Decoder) error
- func (s *ClusterNode) Encode(e *jx.Encoder)
- func (s *ClusterNode) GetAddr() OptString
- func (s *ClusterNode) GetDisks() []ClusterDisk
- func (s *ClusterNode) GetID() string
- func (s *ClusterNode) GetRack() OptString
- func (s *ClusterNode) MarshalJSON() ([]byte, error)
- func (s *ClusterNode) SetAddr(val OptString)
- func (s *ClusterNode) SetDisks(val []ClusterDisk)
- func (s *ClusterNode) SetID(val string)
- func (s *ClusterNode) SetRack(val OptString)
- func (s *ClusterNode) UnmarshalJSON(data []byte) error
- func (s *ClusterNode) Validate() error
- type ClusterState
- func (ClusterState) AllValues() []ClusterState
- func (s *ClusterState) Decode(d *jx.Decoder) error
- func (s ClusterState) Encode(e *jx.Encoder)
- func (s ClusterState) MarshalJSON() ([]byte, error)
- func (s ClusterState) MarshalText() ([]byte, error)
- func (s *ClusterState) UnmarshalJSON(data []byte) error
- func (s *ClusterState) UnmarshalText(data []byte) error
- func (s ClusterState) Validate() error
- type ClusterStatus
- func (s *ClusterStatus) Decode(d *jx.Decoder) error
- func (s *ClusterStatus) Encode(e *jx.Encoder)
- func (s *ClusterStatus) GetBinarySchemaVersion() int
- func (s *ClusterStatus) GetDiskCount() int
- func (s *ClusterStatus) GetFreeBytes() int64
- func (s *ClusterStatus) GetNodeCount() int
- func (s *ClusterStatus) GetNodes() []ClusterNode
- func (s *ClusterStatus) GetPlacementSkew() float64
- func (s *ClusterStatus) GetRebalanceCursorBucket() OptString
- func (s *ClusterStatus) GetRebalanceCursorKey() OptString
- func (s *ClusterStatus) GetRebalanceRunning() bool
- func (s *ClusterStatus) GetSchemaVersion() int
- func (s *ClusterStatus) GetState() ClusterState
- func (s *ClusterStatus) GetTotalBytes() int64
- func (s *ClusterStatus) MarshalJSON() ([]byte, error)
- func (s *ClusterStatus) SetBinarySchemaVersion(val int)
- func (s *ClusterStatus) SetDiskCount(val int)
- func (s *ClusterStatus) SetFreeBytes(val int64)
- func (s *ClusterStatus) SetNodeCount(val int)
- func (s *ClusterStatus) SetNodes(val []ClusterNode)
- func (s *ClusterStatus) SetPlacementSkew(val float64)
- func (s *ClusterStatus) SetRebalanceCursorBucket(val OptString)
- func (s *ClusterStatus) SetRebalanceCursorKey(val OptString)
- func (s *ClusterStatus) SetRebalanceRunning(val bool)
- func (s *ClusterStatus) SetSchemaVersion(val int)
- func (s *ClusterStatus) SetState(val ClusterState)
- func (s *ClusterStatus) SetTotalBytes(val int64)
- func (s *ClusterStatus) UnmarshalJSON(data []byte) error
- func (s *ClusterStatus) Validate() error
- type CreateAccessKeyRequest
- func (s *CreateAccessKeyRequest) Decode(d *jx.Decoder) error
- func (s *CreateAccessKeyRequest) Encode(e *jx.Encoder)
- func (s *CreateAccessKeyRequest) GetAccessKey() OptString
- func (s *CreateAccessKeyRequest) GetGrants() []Grant
- func (s *CreateAccessKeyRequest) GetSecretKey() OptString
- func (s *CreateAccessKeyRequest) MarshalJSON() ([]byte, error)
- func (s *CreateAccessKeyRequest) SetAccessKey(val OptString)
- func (s *CreateAccessKeyRequest) SetGrants(val []Grant)
- func (s *CreateAccessKeyRequest) SetSecretKey(val OptString)
- func (s *CreateAccessKeyRequest) UnmarshalJSON(data []byte) error
- func (s *CreateAccessKeyRequest) Validate() error
- type CreatedAccessKey
- func (s *CreatedAccessKey) Decode(d *jx.Decoder) error
- func (s *CreatedAccessKey) Encode(e *jx.Encoder)
- func (s *CreatedAccessKey) GetAccessKey() string
- func (s *CreatedAccessKey) GetCreatedAt() time.Time
- func (s *CreatedAccessKey) GetGrants() []Grant
- func (s *CreatedAccessKey) GetSecretKey() string
- func (s *CreatedAccessKey) MarshalJSON() ([]byte, error)
- func (s *CreatedAccessKey) SetAccessKey(val string)
- func (s *CreatedAccessKey) SetCreatedAt(val time.Time)
- func (s *CreatedAccessKey) SetGrants(val []Grant)
- func (s *CreatedAccessKey) SetSecretKey(val string)
- func (s *CreatedAccessKey) UnmarshalJSON(data []byte) error
- func (s *CreatedAccessKey) Validate() error
- type DeleteAccessKeyNoContent
- type DeleteAccessKeyParams
- type Error
- type ErrorHandler
- type ErrorStatusCode
- type Grant
- func (s *Grant) Decode(d *jx.Decoder) error
- func (s *Grant) Encode(e *jx.Encoder)
- func (s *Grant) GetBucket() string
- func (s *Grant) GetPermission() Permission
- func (s *Grant) MarshalJSON() ([]byte, error)
- func (s *Grant) SetBucket(val string)
- func (s *Grant) SetPermission(val Permission)
- func (s *Grant) UnmarshalJSON(data []byte) error
- func (s *Grant) Validate() error
- type Handler
- type InstanceInfo
- func (s *InstanceInfo) Decode(d *jx.Decoder) error
- func (s *InstanceInfo) Encode(e *jx.Encoder)
- func (s *InstanceInfo) GetArch() string
- func (s *InstanceInfo) GetAuthEnabled() bool
- func (s *InstanceInfo) GetCommit() string
- func (s *InstanceInfo) GetConfigRevision() OptString
- func (s *InstanceInfo) GetGoVersion() string
- func (s *InstanceInfo) GetOs() string
- func (s *InstanceInfo) GetStartTime() time.Time
- func (s *InstanceInfo) GetUptimeSeconds() float64
- func (s *InstanceInfo) GetVersion() string
- func (s *InstanceInfo) MarshalJSON() ([]byte, error)
- func (s *InstanceInfo) SetArch(val string)
- func (s *InstanceInfo) SetAuthEnabled(val bool)
- func (s *InstanceInfo) SetCommit(val string)
- func (s *InstanceInfo) SetConfigRevision(val OptString)
- func (s *InstanceInfo) SetGoVersion(val string)
- func (s *InstanceInfo) SetOs(val string)
- func (s *InstanceInfo) SetStartTime(val time.Time)
- func (s *InstanceInfo) SetUptimeSeconds(val float64)
- func (s *InstanceInfo) SetVersion(val string)
- func (s *InstanceInfo) UnmarshalJSON(data []byte) error
- func (s *InstanceInfo) Validate() error
- type Invoker
- type Labeler
- type Middleware
- type OperationName
- type OptDateTime
- func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error
- func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))
- func (o OptDateTime) Get() (v time.Time, ok bool)
- func (o OptDateTime) IsSet() bool
- func (s OptDateTime) MarshalJSON() ([]byte, error)
- func (o OptDateTime) Or(d time.Time) time.Time
- func (o *OptDateTime) Reset()
- func (o *OptDateTime) SetTo(v time.Time)
- func (s *OptDateTime) UnmarshalJSON(data []byte) error
- type OptFloat64
- func (o *OptFloat64) Decode(d *jx.Decoder) error
- func (o OptFloat64) Encode(e *jx.Encoder)
- func (o OptFloat64) Get() (v float64, ok bool)
- func (o OptFloat64) IsSet() bool
- func (s OptFloat64) MarshalJSON() ([]byte, error)
- func (o OptFloat64) Or(d float64) float64
- func (o *OptFloat64) Reset()
- func (o *OptFloat64) SetTo(v float64)
- func (s *OptFloat64) UnmarshalJSON(data []byte) error
- type OptInt64
- func (o *OptInt64) Decode(d *jx.Decoder) error
- func (o OptInt64) Encode(e *jx.Encoder)
- func (o OptInt64) Get() (v int64, ok bool)
- func (o OptInt64) IsSet() bool
- func (s OptInt64) MarshalJSON() ([]byte, error)
- func (o OptInt64) Or(d int64) int64
- func (o *OptInt64) Reset()
- func (o *OptInt64) SetTo(v int64)
- func (s *OptInt64) UnmarshalJSON(data []byte) error
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type Option
- type Permission
- func (Permission) AllValues() []Permission
- func (s *Permission) Decode(d *jx.Decoder) error
- func (s Permission) Encode(e *jx.Encoder)
- func (s Permission) MarshalJSON() ([]byte, error)
- func (s Permission) MarshalText() ([]byte, error)
- func (s *Permission) UnmarshalJSON(data []byte) error
- func (s *Permission) UnmarshalText(data []byte) error
- func (s Permission) Validate() error
- type RebalanceAction
- func (RebalanceAction) AllValues() []RebalanceAction
- func (s *RebalanceAction) Decode(d *jx.Decoder) error
- func (s RebalanceAction) Encode(e *jx.Encoder)
- func (s RebalanceAction) MarshalJSON() ([]byte, error)
- func (s RebalanceAction) MarshalText() ([]byte, error)
- func (s *RebalanceAction) UnmarshalJSON(data []byte) error
- func (s *RebalanceAction) UnmarshalText(data []byte) error
- func (s RebalanceAction) Validate() error
- type RebalanceControlRequest
- func (s *RebalanceControlRequest) Decode(d *jx.Decoder) error
- func (s *RebalanceControlRequest) Encode(e *jx.Encoder)
- func (s *RebalanceControlRequest) GetAction() RebalanceAction
- func (s *RebalanceControlRequest) MarshalJSON() ([]byte, error)
- func (s *RebalanceControlRequest) SetAction(val RebalanceAction)
- func (s *RebalanceControlRequest) UnmarshalJSON(data []byte) error
- func (s *RebalanceControlRequest) Validate() error
- type RebalanceState
- func (RebalanceState) AllValues() []RebalanceState
- func (s *RebalanceState) Decode(d *jx.Decoder) error
- func (s RebalanceState) Encode(e *jx.Encoder)
- func (s RebalanceState) MarshalJSON() ([]byte, error)
- func (s RebalanceState) MarshalText() ([]byte, error)
- func (s *RebalanceState) UnmarshalJSON(data []byte) error
- func (s *RebalanceState) UnmarshalText(data []byte) error
- func (s RebalanceState) Validate() error
- type RebalanceStatus
- func (s *RebalanceStatus) Decode(d *jx.Decoder) error
- func (s *RebalanceStatus) Encode(e *jx.Encoder)
- func (s *RebalanceStatus) GetCursorBucket() OptString
- func (s *RebalanceStatus) GetCursorKey() OptString
- func (s *RebalanceStatus) GetErrorMessage() OptString
- func (s *RebalanceStatus) GetFailed() int
- func (s *RebalanceStatus) GetFinishedAt() OptDateTime
- func (s *RebalanceStatus) GetObjects() int
- func (s *RebalanceStatus) GetRelocated() int
- func (s *RebalanceStatus) GetRepairQueueDepth() int
- func (s *RebalanceStatus) GetStartedAt() OptDateTime
- func (s *RebalanceStatus) GetState() RebalanceState
- func (s *RebalanceStatus) MarshalJSON() ([]byte, error)
- func (s *RebalanceStatus) SetCursorBucket(val OptString)
- func (s *RebalanceStatus) SetCursorKey(val OptString)
- func (s *RebalanceStatus) SetErrorMessage(val OptString)
- func (s *RebalanceStatus) SetFailed(val int)
- func (s *RebalanceStatus) SetFinishedAt(val OptDateTime)
- func (s *RebalanceStatus) SetObjects(val int)
- func (s *RebalanceStatus) SetRelocated(val int)
- func (s *RebalanceStatus) SetRepairQueueDepth(val int)
- func (s *RebalanceStatus) SetStartedAt(val OptDateTime)
- func (s *RebalanceStatus) SetState(val RebalanceState)
- func (s *RebalanceStatus) UnmarshalJSON(data []byte) error
- func (s *RebalanceStatus) Validate() error
- type ReloadResult
- func (s *ReloadResult) Decode(d *jx.Decoder) error
- func (s *ReloadResult) Encode(e *jx.Encoder)
- func (s *ReloadResult) GetConfigRevision() OptString
- func (s *ReloadResult) GetReloaded() []string
- func (s *ReloadResult) MarshalJSON() ([]byte, error)
- func (s *ReloadResult) SetConfigRevision(val OptString)
- func (s *ReloadResult) SetReloaded(val []string)
- func (s *ReloadResult) UnmarshalJSON(data []byte) error
- func (s *ReloadResult) Validate() error
- type Route
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type Source
- func (Source) AllValues() []Source
- func (s *Source) Decode(d *jx.Decoder) error
- func (s Source) Encode(e *jx.Encoder)
- func (s Source) MarshalJSON() ([]byte, error)
- func (s Source) MarshalText() ([]byte, error)
- func (s *Source) UnmarshalJSON(data []byte) error
- func (s *Source) UnmarshalText(data []byte) error
- func (s Source) Validate() error
- type UnimplementedHandler
- func (UnimplementedHandler) ControlRebalance(ctx context.Context, req *RebalanceControlRequest) (r *RebalanceStatus, _ error)
- func (UnimplementedHandler) CreateAccessKey(ctx context.Context, req *CreateAccessKeyRequest) (r *CreatedAccessKey, _ error)
- func (UnimplementedHandler) DeleteAccessKey(ctx context.Context, params DeleteAccessKeyParams) error
- func (UnimplementedHandler) GetClusterStatus(ctx context.Context) (r *ClusterStatus, _ error)
- func (UnimplementedHandler) GetInfo(ctx context.Context) (r *InstanceInfo, _ error)
- func (UnimplementedHandler) GetRebalanceStatus(ctx context.Context) (r *RebalanceStatus, _ error)
- func (UnimplementedHandler) ListAccessKeys(ctx context.Context) (r *AccessKeyList, _ error)
- func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrorStatusCode)
- func (UnimplementedHandler) ReloadConfig(ctx context.Context) (r *ReloadResult, _ error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessKey ¶
type AccessKey struct {
AccessKey string `json:"access_key"`
Grants []Grant `json:"grants"`
Source Source `json:"source"`
// Creation time, for runtime-managed credentials.
CreatedAt OptDateTime `json:"created_at"`
}
Ref: #/components/schemas/AccessKey
func (*AccessKey) GetAccessKey ¶
GetAccessKey returns the value of AccessKey.
func (*AccessKey) GetCreatedAt ¶
func (s *AccessKey) GetCreatedAt() OptDateTime
GetCreatedAt returns the value of CreatedAt.
func (*AccessKey) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*AccessKey) SetAccessKey ¶
SetAccessKey sets the value of AccessKey.
func (*AccessKey) SetCreatedAt ¶
func (s *AccessKey) SetCreatedAt(val OptDateTime)
SetCreatedAt sets the value of CreatedAt.
func (*AccessKey) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type AccessKeyList ¶
type AccessKeyList struct {
Keys []AccessKey `json:"keys"`
}
Ref: #/components/schemas/AccessKeyList
func (*AccessKeyList) Decode ¶
func (s *AccessKeyList) Decode(d *jx.Decoder) error
Decode decodes AccessKeyList from json.
func (*AccessKeyList) Encode ¶
func (s *AccessKeyList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AccessKeyList) GetKeys ¶
func (s *AccessKeyList) GetKeys() []AccessKey
GetKeys returns the value of Keys.
func (*AccessKeyList) MarshalJSON ¶
func (s *AccessKeyList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AccessKeyList) SetKeys ¶
func (s *AccessKeyList) SetKeys(val []AccessKey)
SetKeys sets the value of Keys.
func (*AccessKeyList) UnmarshalJSON ¶
func (s *AccessKeyList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*AccessKeyList) Validate ¶
func (s *AccessKeyList) Validate() error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) ControlRebalance ¶
func (c *Client) ControlRebalance(ctx context.Context, request *RebalanceControlRequest) (*RebalanceStatus, error)
ControlRebalance invokes controlRebalance operation.
Start, pause or resume the cluster-wide rebalance from this node. At most one rebalance runs cluster-wide (etcd election); starting on several nodes leaves the extras waiting as standby runners. Pausing stops this node's runner and keeps the resume cursor, so a later start/resume — on any node — continues where it left off.
POST /api/v1/cluster/rebalance
func (*Client) CreateAccessKey ¶
func (c *Client) CreateAccessKey(ctx context.Context, request *CreateAccessKeyRequest) (*CreatedAccessKey, error)
CreateAccessKey invokes createAccessKey operation.
Create a runtime credential. The access key and secret are generated when not supplied. The secret is returned only in this response and cannot be retrieved later.
POST /api/v1/access-keys
func (*Client) DeleteAccessKey ¶
func (c *Client) DeleteAccessKey(ctx context.Context, params DeleteAccessKeyParams) error
DeleteAccessKey invokes deleteAccessKey operation.
Remove a runtime credential. Config-defined credentials cannot be deleted.
DELETE /api/v1/access-keys/{accessKey}
func (*Client) GetClusterStatus ¶
func (c *Client) GetClusterStatus(ctx context.Context) (*ClusterStatus, error)
GetClusterStatus invokes getClusterStatus operation.
Cluster-wide view read from the control plane: the agreed schema version, every node with its disks and reported capacity, aggregate capacity, placement skew and whether a rebalance is currently running. State is "disabled" when the server is not in cluster mode.
GET /api/v1/cluster/status
func (*Client) GetInfo ¶
func (c *Client) GetInfo(ctx context.Context) (*InstanceInfo, error)
GetInfo invokes getInfo operation.
Build information, uptime and whether authentication is enabled.
GET /api/v1/info
func (*Client) GetRebalanceStatus ¶
func (c *Client) GetRebalanceStatus(ctx context.Context) (*RebalanceStatus, error)
GetRebalanceStatus invokes getRebalanceStatus operation.
State and progress of the cluster rebalance runner on this node, the persisted resume cursor and the depth of the async repair queue. State is "disabled" when the server is not in cluster mode.
GET /api/v1/cluster/rebalance
func (*Client) ListAccessKeys ¶
func (c *Client) ListAccessKeys(ctx context.Context) (*AccessKeyList, error)
ListAccessKeys invokes listAccessKeys operation.
Every credential the server accepts, secrets omitted.
GET /api/v1/access-keys
func (*Client) ReloadConfig ¶
func (c *Client) ReloadConfig(ctx context.Context) (*ReloadResult, error)
ReloadConfig invokes reloadConfig operation.
Re-read the configuration file and apply the parts that change without a restart — the config-defined credentials and grants, the anonymously readable buckets and the TLS certificate — exactly as SIGHUP does. Runtime credentials created through this API are preserved. Returns what was reloaded and the config revision now in effect, so an orchestrator can confirm a config change landed without shelling into the process. Returns 501 on a listener with nothing to reload (the headless cluster admin serves no S3 data).
POST /api/v1/reload
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption is client config option.
func WithClient ¶
func WithClient(client ht.Client) ClientOption
WithClient specifies http client to use.
type ClusterDisk ¶
type ClusterDisk struct {
ID string `json:"id"`
// Relative placement weight (0 = drained).
Weight float64 `json:"weight"`
// Reported filesystem size; 0 when the node has not reported capacity.
TotalBytes OptInt64 `json:"total_bytes"`
FreeBytes OptInt64 `json:"free_bytes"`
// Used fraction (0..1); omitted when capacity is unknown.
Fullness OptFloat64 `json:"fullness"`
}
Ref: #/components/schemas/ClusterDisk
func (*ClusterDisk) Decode ¶
func (s *ClusterDisk) Decode(d *jx.Decoder) error
Decode decodes ClusterDisk from json.
func (*ClusterDisk) Encode ¶
func (s *ClusterDisk) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ClusterDisk) GetFreeBytes ¶
func (s *ClusterDisk) GetFreeBytes() OptInt64
GetFreeBytes returns the value of FreeBytes.
func (*ClusterDisk) GetFullness ¶
func (s *ClusterDisk) GetFullness() OptFloat64
GetFullness returns the value of Fullness.
func (*ClusterDisk) GetTotalBytes ¶
func (s *ClusterDisk) GetTotalBytes() OptInt64
GetTotalBytes returns the value of TotalBytes.
func (*ClusterDisk) GetWeight ¶
func (s *ClusterDisk) GetWeight() float64
GetWeight returns the value of Weight.
func (*ClusterDisk) MarshalJSON ¶
func (s *ClusterDisk) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ClusterDisk) SetFreeBytes ¶
func (s *ClusterDisk) SetFreeBytes(val OptInt64)
SetFreeBytes sets the value of FreeBytes.
func (*ClusterDisk) SetFullness ¶
func (s *ClusterDisk) SetFullness(val OptFloat64)
SetFullness sets the value of Fullness.
func (*ClusterDisk) SetTotalBytes ¶
func (s *ClusterDisk) SetTotalBytes(val OptInt64)
SetTotalBytes sets the value of TotalBytes.
func (*ClusterDisk) SetWeight ¶
func (s *ClusterDisk) SetWeight(val float64)
SetWeight sets the value of Weight.
func (*ClusterDisk) UnmarshalJSON ¶
func (s *ClusterDisk) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ClusterDisk) Validate ¶
func (s *ClusterDisk) Validate() error
type ClusterNode ¶
type ClusterNode struct {
ID string `json:"id"`
// Peer address the node advertises.
Addr OptString `json:"addr"`
// Failure-domain label.
Rack OptString `json:"rack"`
Disks []ClusterDisk `json:"disks"`
}
Ref: #/components/schemas/ClusterNode
func (*ClusterNode) Decode ¶
func (s *ClusterNode) Decode(d *jx.Decoder) error
Decode decodes ClusterNode from json.
func (*ClusterNode) Encode ¶
func (s *ClusterNode) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ClusterNode) GetAddr ¶
func (s *ClusterNode) GetAddr() OptString
GetAddr returns the value of Addr.
func (*ClusterNode) GetDisks ¶
func (s *ClusterNode) GetDisks() []ClusterDisk
GetDisks returns the value of Disks.
func (*ClusterNode) GetRack ¶
func (s *ClusterNode) GetRack() OptString
GetRack returns the value of Rack.
func (*ClusterNode) MarshalJSON ¶
func (s *ClusterNode) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ClusterNode) SetAddr ¶
func (s *ClusterNode) SetAddr(val OptString)
SetAddr sets the value of Addr.
func (*ClusterNode) SetDisks ¶
func (s *ClusterNode) SetDisks(val []ClusterDisk)
SetDisks sets the value of Disks.
func (*ClusterNode) SetRack ¶
func (s *ClusterNode) SetRack(val OptString)
SetRack sets the value of Rack.
func (*ClusterNode) UnmarshalJSON ¶
func (s *ClusterNode) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ClusterNode) Validate ¶
func (s *ClusterNode) Validate() error
type ClusterState ¶
type ClusterState string
"disabled" when the server is not in cluster mode. Ref: #/components/schemas/ClusterState
const ( ClusterStateDisabled ClusterState = "disabled" ClusterStateOk ClusterState = "ok" )
func (ClusterState) AllValues ¶
func (ClusterState) AllValues() []ClusterState
AllValues returns all ClusterState values.
func (*ClusterState) Decode ¶
func (s *ClusterState) Decode(d *jx.Decoder) error
Decode decodes ClusterState from json.
func (ClusterState) Encode ¶
func (s ClusterState) Encode(e *jx.Encoder)
Encode encodes ClusterState as json.
func (ClusterState) MarshalJSON ¶
func (s ClusterState) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ClusterState) MarshalText ¶
func (s ClusterState) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ClusterState) UnmarshalJSON ¶
func (s *ClusterState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ClusterState) UnmarshalText ¶
func (s *ClusterState) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ClusterState) Validate ¶
func (s ClusterState) Validate() error
type ClusterStatus ¶
type ClusterStatus struct {
State ClusterState `json:"state"`
// Schema version the cluster has agreed on (etcd).
SchemaVersion int `json:"schema_version"`
// Schema version this binary implements.
BinarySchemaVersion int `json:"binary_schema_version"`
NodeCount int `json:"node_count"`
DiskCount int `json:"disk_count"`
// Sum of reported disk capacity across the cluster.
TotalBytes int64 `json:"total_bytes"`
FreeBytes int64 `json:"free_bytes"`
// Max minus min disk fullness across disks reporting capacity.
PlacementSkew float64 `json:"placement_skew"`
// Whether a rebalance runner currently holds the cluster-wide election.
RebalanceRunning bool `json:"rebalance_running"`
// Resume cursor of an in-progress/last rebalance, if any.
RebalanceCursorBucket OptString `json:"rebalance_cursor_bucket"`
RebalanceCursorKey OptString `json:"rebalance_cursor_key"`
Nodes []ClusterNode `json:"nodes"`
}
Ref: #/components/schemas/ClusterStatus
func (*ClusterStatus) Decode ¶
func (s *ClusterStatus) Decode(d *jx.Decoder) error
Decode decodes ClusterStatus from json.
func (*ClusterStatus) Encode ¶
func (s *ClusterStatus) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ClusterStatus) GetBinarySchemaVersion ¶
func (s *ClusterStatus) GetBinarySchemaVersion() int
GetBinarySchemaVersion returns the value of BinarySchemaVersion.
func (*ClusterStatus) GetDiskCount ¶
func (s *ClusterStatus) GetDiskCount() int
GetDiskCount returns the value of DiskCount.
func (*ClusterStatus) GetFreeBytes ¶
func (s *ClusterStatus) GetFreeBytes() int64
GetFreeBytes returns the value of FreeBytes.
func (*ClusterStatus) GetNodeCount ¶
func (s *ClusterStatus) GetNodeCount() int
GetNodeCount returns the value of NodeCount.
func (*ClusterStatus) GetNodes ¶
func (s *ClusterStatus) GetNodes() []ClusterNode
GetNodes returns the value of Nodes.
func (*ClusterStatus) GetPlacementSkew ¶
func (s *ClusterStatus) GetPlacementSkew() float64
GetPlacementSkew returns the value of PlacementSkew.
func (*ClusterStatus) GetRebalanceCursorBucket ¶
func (s *ClusterStatus) GetRebalanceCursorBucket() OptString
GetRebalanceCursorBucket returns the value of RebalanceCursorBucket.
func (*ClusterStatus) GetRebalanceCursorKey ¶
func (s *ClusterStatus) GetRebalanceCursorKey() OptString
GetRebalanceCursorKey returns the value of RebalanceCursorKey.
func (*ClusterStatus) GetRebalanceRunning ¶
func (s *ClusterStatus) GetRebalanceRunning() bool
GetRebalanceRunning returns the value of RebalanceRunning.
func (*ClusterStatus) GetSchemaVersion ¶
func (s *ClusterStatus) GetSchemaVersion() int
GetSchemaVersion returns the value of SchemaVersion.
func (*ClusterStatus) GetState ¶
func (s *ClusterStatus) GetState() ClusterState
GetState returns the value of State.
func (*ClusterStatus) GetTotalBytes ¶
func (s *ClusterStatus) GetTotalBytes() int64
GetTotalBytes returns the value of TotalBytes.
func (*ClusterStatus) MarshalJSON ¶
func (s *ClusterStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ClusterStatus) SetBinarySchemaVersion ¶
func (s *ClusterStatus) SetBinarySchemaVersion(val int)
SetBinarySchemaVersion sets the value of BinarySchemaVersion.
func (*ClusterStatus) SetDiskCount ¶
func (s *ClusterStatus) SetDiskCount(val int)
SetDiskCount sets the value of DiskCount.
func (*ClusterStatus) SetFreeBytes ¶
func (s *ClusterStatus) SetFreeBytes(val int64)
SetFreeBytes sets the value of FreeBytes.
func (*ClusterStatus) SetNodeCount ¶
func (s *ClusterStatus) SetNodeCount(val int)
SetNodeCount sets the value of NodeCount.
func (*ClusterStatus) SetNodes ¶
func (s *ClusterStatus) SetNodes(val []ClusterNode)
SetNodes sets the value of Nodes.
func (*ClusterStatus) SetPlacementSkew ¶
func (s *ClusterStatus) SetPlacementSkew(val float64)
SetPlacementSkew sets the value of PlacementSkew.
func (*ClusterStatus) SetRebalanceCursorBucket ¶
func (s *ClusterStatus) SetRebalanceCursorBucket(val OptString)
SetRebalanceCursorBucket sets the value of RebalanceCursorBucket.
func (*ClusterStatus) SetRebalanceCursorKey ¶
func (s *ClusterStatus) SetRebalanceCursorKey(val OptString)
SetRebalanceCursorKey sets the value of RebalanceCursorKey.
func (*ClusterStatus) SetRebalanceRunning ¶
func (s *ClusterStatus) SetRebalanceRunning(val bool)
SetRebalanceRunning sets the value of RebalanceRunning.
func (*ClusterStatus) SetSchemaVersion ¶
func (s *ClusterStatus) SetSchemaVersion(val int)
SetSchemaVersion sets the value of SchemaVersion.
func (*ClusterStatus) SetState ¶
func (s *ClusterStatus) SetState(val ClusterState)
SetState sets the value of State.
func (*ClusterStatus) SetTotalBytes ¶
func (s *ClusterStatus) SetTotalBytes(val int64)
SetTotalBytes sets the value of TotalBytes.
func (*ClusterStatus) UnmarshalJSON ¶
func (s *ClusterStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ClusterStatus) Validate ¶
func (s *ClusterStatus) Validate() error
type CreateAccessKeyRequest ¶
type CreateAccessKeyRequest struct {
// Access key ID; generated when omitted.
AccessKey OptString `json:"access_key"`
// Secret access key; generated when omitted.
SecretKey OptString `json:"secret_key"`
Grants []Grant `json:"grants"`
}
Ref: #/components/schemas/CreateAccessKeyRequest
func (*CreateAccessKeyRequest) Decode ¶
func (s *CreateAccessKeyRequest) Decode(d *jx.Decoder) error
Decode decodes CreateAccessKeyRequest from json.
func (*CreateAccessKeyRequest) Encode ¶
func (s *CreateAccessKeyRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateAccessKeyRequest) GetAccessKey ¶
func (s *CreateAccessKeyRequest) GetAccessKey() OptString
GetAccessKey returns the value of AccessKey.
func (*CreateAccessKeyRequest) GetGrants ¶
func (s *CreateAccessKeyRequest) GetGrants() []Grant
GetGrants returns the value of Grants.
func (*CreateAccessKeyRequest) GetSecretKey ¶
func (s *CreateAccessKeyRequest) GetSecretKey() OptString
GetSecretKey returns the value of SecretKey.
func (*CreateAccessKeyRequest) MarshalJSON ¶
func (s *CreateAccessKeyRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateAccessKeyRequest) SetAccessKey ¶
func (s *CreateAccessKeyRequest) SetAccessKey(val OptString)
SetAccessKey sets the value of AccessKey.
func (*CreateAccessKeyRequest) SetGrants ¶
func (s *CreateAccessKeyRequest) SetGrants(val []Grant)
SetGrants sets the value of Grants.
func (*CreateAccessKeyRequest) SetSecretKey ¶
func (s *CreateAccessKeyRequest) SetSecretKey(val OptString)
SetSecretKey sets the value of SecretKey.
func (*CreateAccessKeyRequest) UnmarshalJSON ¶
func (s *CreateAccessKeyRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateAccessKeyRequest) Validate ¶
func (s *CreateAccessKeyRequest) Validate() error
type CreatedAccessKey ¶
type CreatedAccessKey struct {
AccessKey string `json:"access_key"`
// Secret access key — shown once, not retrievable later.
SecretKey string `json:"secret_key"`
Grants []Grant `json:"grants"`
CreatedAt time.Time `json:"created_at"`
}
Ref: #/components/schemas/CreatedAccessKey
func (*CreatedAccessKey) Decode ¶
func (s *CreatedAccessKey) Decode(d *jx.Decoder) error
Decode decodes CreatedAccessKey from json.
func (*CreatedAccessKey) Encode ¶
func (s *CreatedAccessKey) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreatedAccessKey) GetAccessKey ¶
func (s *CreatedAccessKey) GetAccessKey() string
GetAccessKey returns the value of AccessKey.
func (*CreatedAccessKey) GetCreatedAt ¶
func (s *CreatedAccessKey) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*CreatedAccessKey) GetGrants ¶
func (s *CreatedAccessKey) GetGrants() []Grant
GetGrants returns the value of Grants.
func (*CreatedAccessKey) GetSecretKey ¶
func (s *CreatedAccessKey) GetSecretKey() string
GetSecretKey returns the value of SecretKey.
func (*CreatedAccessKey) MarshalJSON ¶
func (s *CreatedAccessKey) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreatedAccessKey) SetAccessKey ¶
func (s *CreatedAccessKey) SetAccessKey(val string)
SetAccessKey sets the value of AccessKey.
func (*CreatedAccessKey) SetCreatedAt ¶
func (s *CreatedAccessKey) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*CreatedAccessKey) SetGrants ¶
func (s *CreatedAccessKey) SetGrants(val []Grant)
SetGrants sets the value of Grants.
func (*CreatedAccessKey) SetSecretKey ¶
func (s *CreatedAccessKey) SetSecretKey(val string)
SetSecretKey sets the value of SecretKey.
func (*CreatedAccessKey) UnmarshalJSON ¶
func (s *CreatedAccessKey) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreatedAccessKey) Validate ¶
func (s *CreatedAccessKey) Validate() error
type DeleteAccessKeyNoContent ¶
type DeleteAccessKeyNoContent struct{}
DeleteAccessKeyNoContent is response for DeleteAccessKey operation.
type DeleteAccessKeyParams ¶
type DeleteAccessKeyParams struct {
// The access key ID to delete.
AccessKey string
}
DeleteAccessKeyParams is parameters of deleteAccessKey operation.
type Error ¶
type Error struct {
ErrorMessage string `json:"error_message"`
}
Error occurred while processing request. Ref: #/components/schemas/Error
func (*Error) GetErrorMessage ¶
GetErrorMessage returns the value of ErrorMessage.
func (*Error) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Error) SetErrorMessage ¶
SetErrorMessage sets the value of ErrorMessage.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ErrorStatusCode ¶
ErrorStatusCode wraps Error with StatusCode.
func (*ErrorStatusCode) Error ¶
func (s *ErrorStatusCode) Error() string
func (*ErrorStatusCode) GetResponse ¶
func (s *ErrorStatusCode) GetResponse() Error
GetResponse returns the value of Response.
func (*ErrorStatusCode) GetStatusCode ¶
func (s *ErrorStatusCode) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*ErrorStatusCode) SetResponse ¶
func (s *ErrorStatusCode) SetResponse(val Error)
SetResponse sets the value of Response.
func (*ErrorStatusCode) SetStatusCode ¶
func (s *ErrorStatusCode) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
type Grant ¶
type Grant struct {
// Bucket glob pattern; "*" matches all buckets.
Bucket string `json:"bucket"`
Permission Permission `json:"permission"`
}
Ref: #/components/schemas/Grant
func (*Grant) GetPermission ¶
func (s *Grant) GetPermission() Permission
GetPermission returns the value of Permission.
func (*Grant) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Grant) SetPermission ¶
func (s *Grant) SetPermission(val Permission)
SetPermission sets the value of Permission.
func (*Grant) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Handler ¶
type Handler interface {
// ControlRebalance implements controlRebalance operation.
//
// Start, pause or resume the cluster-wide rebalance from this node. At most one rebalance runs
// cluster-wide (etcd election); starting on several nodes leaves the extras waiting as standby
// runners. Pausing stops this node's runner and keeps the resume cursor, so a later start/resume —
// on any node — continues where it left off.
//
// POST /api/v1/cluster/rebalance
ControlRebalance(ctx context.Context, req *RebalanceControlRequest) (*RebalanceStatus, error)
// CreateAccessKey implements createAccessKey operation.
//
// Create a runtime credential. The access key and secret are generated when not supplied. The secret
// is returned only in this response and cannot be retrieved later.
//
// POST /api/v1/access-keys
CreateAccessKey(ctx context.Context, req *CreateAccessKeyRequest) (*CreatedAccessKey, error)
// DeleteAccessKey implements deleteAccessKey operation.
//
// Remove a runtime credential. Config-defined credentials cannot be deleted.
//
// DELETE /api/v1/access-keys/{accessKey}
DeleteAccessKey(ctx context.Context, params DeleteAccessKeyParams) error
// GetClusterStatus implements getClusterStatus operation.
//
// Cluster-wide view read from the control plane: the agreed schema version, every node with its disks
// and reported capacity, aggregate capacity, placement skew and whether a rebalance is currently
// running. State is "disabled" when the server is not in cluster mode.
//
// GET /api/v1/cluster/status
GetClusterStatus(ctx context.Context) (*ClusterStatus, error)
// GetInfo implements getInfo operation.
//
// Build information, uptime and whether authentication is enabled.
//
// GET /api/v1/info
GetInfo(ctx context.Context) (*InstanceInfo, error)
// GetRebalanceStatus implements getRebalanceStatus operation.
//
// State and progress of the cluster rebalance runner on this node, the persisted resume cursor and the
// depth of the async repair queue. State is "disabled" when the server is not in cluster mode.
//
// GET /api/v1/cluster/rebalance
GetRebalanceStatus(ctx context.Context) (*RebalanceStatus, error)
// ListAccessKeys implements listAccessKeys operation.
//
// Every credential the server accepts, secrets omitted.
//
// GET /api/v1/access-keys
ListAccessKeys(ctx context.Context) (*AccessKeyList, error)
// ReloadConfig implements reloadConfig operation.
//
// Re-read the configuration file and apply the parts that change without a restart — the
// config-defined credentials and grants, the anonymously readable buckets and the TLS certificate —
// exactly as SIGHUP does. Runtime credentials created through this API are preserved. Returns what was
// reloaded and the config revision now in effect, so an orchestrator can confirm a config change
// landed without shelling into the process. Returns 501 on a listener with nothing to reload (the
// headless cluster admin serves no S3 data).
//
// POST /api/v1/reload
ReloadConfig(ctx context.Context) (*ReloadResult, error)
// NewError creates *ErrorStatusCode from error returned by handler.
//
// Used for common default response.
NewError(ctx context.Context, err error) *ErrorStatusCode
}
Handler handles operations described by OpenAPI v3 specification.
type InstanceInfo ¶
type InstanceInfo struct {
Version string `json:"version"`
Commit string `json:"commit"`
GoVersion string `json:"go_version"`
Os string `json:"os"`
Arch string `json:"arch"`
StartTime time.Time `json:"start_time"`
UptimeSeconds float64 `json:"uptime_seconds"`
// Whether SigV4 authentication is enabled.
AuthEnabled bool `json:"auth_enabled"`
// Opaque marker echoed from the loaded config file's "revision" field, updated on reload. Empty when
// the config sets none. An orchestrator writes a revision into each node's config and reads it back
// here to confirm the node has applied that revision.
ConfigRevision OptString `json:"config_revision"`
}
Ref: #/components/schemas/InstanceInfo
func (*InstanceInfo) Decode ¶
func (s *InstanceInfo) Decode(d *jx.Decoder) error
Decode decodes InstanceInfo from json.
func (*InstanceInfo) Encode ¶
func (s *InstanceInfo) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*InstanceInfo) GetArch ¶
func (s *InstanceInfo) GetArch() string
GetArch returns the value of Arch.
func (*InstanceInfo) GetAuthEnabled ¶
func (s *InstanceInfo) GetAuthEnabled() bool
GetAuthEnabled returns the value of AuthEnabled.
func (*InstanceInfo) GetCommit ¶
func (s *InstanceInfo) GetCommit() string
GetCommit returns the value of Commit.
func (*InstanceInfo) GetConfigRevision ¶
func (s *InstanceInfo) GetConfigRevision() OptString
GetConfigRevision returns the value of ConfigRevision.
func (*InstanceInfo) GetGoVersion ¶
func (s *InstanceInfo) GetGoVersion() string
GetGoVersion returns the value of GoVersion.
func (*InstanceInfo) GetStartTime ¶
func (s *InstanceInfo) GetStartTime() time.Time
GetStartTime returns the value of StartTime.
func (*InstanceInfo) GetUptimeSeconds ¶
func (s *InstanceInfo) GetUptimeSeconds() float64
GetUptimeSeconds returns the value of UptimeSeconds.
func (*InstanceInfo) GetVersion ¶
func (s *InstanceInfo) GetVersion() string
GetVersion returns the value of Version.
func (*InstanceInfo) MarshalJSON ¶
func (s *InstanceInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*InstanceInfo) SetArch ¶
func (s *InstanceInfo) SetArch(val string)
SetArch sets the value of Arch.
func (*InstanceInfo) SetAuthEnabled ¶
func (s *InstanceInfo) SetAuthEnabled(val bool)
SetAuthEnabled sets the value of AuthEnabled.
func (*InstanceInfo) SetCommit ¶
func (s *InstanceInfo) SetCommit(val string)
SetCommit sets the value of Commit.
func (*InstanceInfo) SetConfigRevision ¶
func (s *InstanceInfo) SetConfigRevision(val OptString)
SetConfigRevision sets the value of ConfigRevision.
func (*InstanceInfo) SetGoVersion ¶
func (s *InstanceInfo) SetGoVersion(val string)
SetGoVersion sets the value of GoVersion.
func (*InstanceInfo) SetStartTime ¶
func (s *InstanceInfo) SetStartTime(val time.Time)
SetStartTime sets the value of StartTime.
func (*InstanceInfo) SetUptimeSeconds ¶
func (s *InstanceInfo) SetUptimeSeconds(val float64)
SetUptimeSeconds sets the value of UptimeSeconds.
func (*InstanceInfo) SetVersion ¶
func (s *InstanceInfo) SetVersion(val string)
SetVersion sets the value of Version.
func (*InstanceInfo) UnmarshalJSON ¶
func (s *InstanceInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*InstanceInfo) Validate ¶
func (s *InstanceInfo) Validate() error
type Invoker ¶
type Invoker interface {
// ControlRebalance invokes controlRebalance operation.
//
// Start, pause or resume the cluster-wide rebalance from this node. At most one rebalance runs
// cluster-wide (etcd election); starting on several nodes leaves the extras waiting as standby
// runners. Pausing stops this node's runner and keeps the resume cursor, so a later start/resume —
// on any node — continues where it left off.
//
// POST /api/v1/cluster/rebalance
ControlRebalance(ctx context.Context, request *RebalanceControlRequest) (*RebalanceStatus, error)
// CreateAccessKey invokes createAccessKey operation.
//
// Create a runtime credential. The access key and secret are generated when not supplied. The secret
// is returned only in this response and cannot be retrieved later.
//
// POST /api/v1/access-keys
CreateAccessKey(ctx context.Context, request *CreateAccessKeyRequest) (*CreatedAccessKey, error)
// DeleteAccessKey invokes deleteAccessKey operation.
//
// Remove a runtime credential. Config-defined credentials cannot be deleted.
//
// DELETE /api/v1/access-keys/{accessKey}
DeleteAccessKey(ctx context.Context, params DeleteAccessKeyParams) error
// GetClusterStatus invokes getClusterStatus operation.
//
// Cluster-wide view read from the control plane: the agreed schema version, every node with its disks
// and reported capacity, aggregate capacity, placement skew and whether a rebalance is currently
// running. State is "disabled" when the server is not in cluster mode.
//
// GET /api/v1/cluster/status
GetClusterStatus(ctx context.Context) (*ClusterStatus, error)
// GetInfo invokes getInfo operation.
//
// Build information, uptime and whether authentication is enabled.
//
// GET /api/v1/info
GetInfo(ctx context.Context) (*InstanceInfo, error)
// GetRebalanceStatus invokes getRebalanceStatus operation.
//
// State and progress of the cluster rebalance runner on this node, the persisted resume cursor and the
// depth of the async repair queue. State is "disabled" when the server is not in cluster mode.
//
// GET /api/v1/cluster/rebalance
GetRebalanceStatus(ctx context.Context) (*RebalanceStatus, error)
// ListAccessKeys invokes listAccessKeys operation.
//
// Every credential the server accepts, secrets omitted.
//
// GET /api/v1/access-keys
ListAccessKeys(ctx context.Context) (*AccessKeyList, error)
// ReloadConfig invokes reloadConfig operation.
//
// Re-read the configuration file and apply the parts that change without a restart — the
// config-defined credentials and grants, the anonymously readable buckets and the TLS certificate —
// exactly as SIGHUP does. Runtime credentials created through this API are preserved. Returns what was
// reloaded and the config revision now in effect, so an orchestrator can confirm a config change
// landed without shelling into the process. Returns 501 on a listener with nothing to reload (the
// headless cluster admin serves no S3 data).
//
// POST /api/v1/reload
ReloadConfig(ctx context.Context) (*ReloadResult, error)
}
Invoker invokes operations described by OpenAPI v3 specification.
type Labeler ¶
type Labeler struct {
// contains filtered or unexported fields
}
Labeler is used to allow adding custom attributes to the server request metrics.
func LabelerFromContext ¶
LabelerFromContext retrieves the Labeler from the provided context, if present.
If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.
func (*Labeler) AttributeSet ¶
AttributeSet returns the attributes added to the Labeler as an attribute.Set.
type OperationName ¶
type OperationName = string
OperationName is the ogen operation name
const ( ControlRebalanceOperation OperationName = "ControlRebalance" CreateAccessKeyOperation OperationName = "CreateAccessKey" DeleteAccessKeyOperation OperationName = "DeleteAccessKey" GetClusterStatusOperation OperationName = "GetClusterStatus" GetInfoOperation OperationName = "GetInfo" GetRebalanceStatusOperation OperationName = "GetRebalanceStatus" ListAccessKeysOperation OperationName = "ListAccessKeys" ReloadConfigOperation OperationName = "ReloadConfig" )
type OptDateTime ¶
OptDateTime is optional time.Time.
func NewOptDateTime ¶
func NewOptDateTime(v time.Time) OptDateTime
NewOptDateTime returns new OptDateTime with value set to v.
func (OptDateTime) Get ¶
func (o OptDateTime) Get() (v time.Time, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptDateTime) IsSet ¶
func (o OptDateTime) IsSet() bool
IsSet returns true if OptDateTime was set.
func (OptDateTime) MarshalJSON ¶
func (s OptDateTime) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptDateTime) Or ¶
func (o OptDateTime) Or(d time.Time) time.Time
Or returns value if set, or given parameter if does not.
func (*OptDateTime) UnmarshalJSON ¶
func (s *OptDateTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptFloat64 ¶
OptFloat64 is optional float64.
func NewOptFloat64 ¶
func NewOptFloat64(v float64) OptFloat64
NewOptFloat64 returns new OptFloat64 with value set to v.
func (*OptFloat64) Decode ¶
func (o *OptFloat64) Decode(d *jx.Decoder) error
Decode decodes float64 from json.
func (OptFloat64) Encode ¶
func (o OptFloat64) Encode(e *jx.Encoder)
Encode encodes float64 as json.
func (OptFloat64) Get ¶
func (o OptFloat64) Get() (v float64, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptFloat64) IsSet ¶
func (o OptFloat64) IsSet() bool
IsSet returns true if OptFloat64 was set.
func (OptFloat64) MarshalJSON ¶
func (s OptFloat64) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptFloat64) Or ¶
func (o OptFloat64) Or(d float64) float64
Or returns value if set, or given parameter if does not.
func (*OptFloat64) UnmarshalJSON ¶
func (s *OptFloat64) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptInt64 ¶
OptInt64 is optional int64.
func NewOptInt64 ¶
NewOptInt64 returns new OptInt64 with value set to v.
func (OptInt64) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt64) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface {
ServerOption
ClientOption
}
Option is config option.
func WithAttributes ¶
WithAttributes specifies default otel attributes.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the otel.GetMeterProvider() is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type Permission ¶
type Permission string
Access level; Admin includes Write includes Read. Ref: #/components/schemas/Permission
const ( PermissionRead Permission = "read" PermissionWrite Permission = "write" PermissionAdmin Permission = "admin" )
func (Permission) AllValues ¶
func (Permission) AllValues() []Permission
AllValues returns all Permission values.
func (*Permission) Decode ¶
func (s *Permission) Decode(d *jx.Decoder) error
Decode decodes Permission from json.
func (Permission) Encode ¶
func (s Permission) Encode(e *jx.Encoder)
Encode encodes Permission as json.
func (Permission) MarshalJSON ¶
func (s Permission) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (Permission) MarshalText ¶
func (s Permission) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*Permission) UnmarshalJSON ¶
func (s *Permission) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*Permission) UnmarshalText ¶
func (s *Permission) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (Permission) Validate ¶
func (s Permission) Validate() error
type RebalanceAction ¶
type RebalanceAction string
Ref: #/components/schemas/RebalanceAction
const ( RebalanceActionStart RebalanceAction = "start" RebalanceActionPause RebalanceAction = "pause" RebalanceActionResume RebalanceAction = "resume" )
func (RebalanceAction) AllValues ¶
func (RebalanceAction) AllValues() []RebalanceAction
AllValues returns all RebalanceAction values.
func (*RebalanceAction) Decode ¶
func (s *RebalanceAction) Decode(d *jx.Decoder) error
Decode decodes RebalanceAction from json.
func (RebalanceAction) Encode ¶
func (s RebalanceAction) Encode(e *jx.Encoder)
Encode encodes RebalanceAction as json.
func (RebalanceAction) MarshalJSON ¶
func (s RebalanceAction) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (RebalanceAction) MarshalText ¶
func (s RebalanceAction) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*RebalanceAction) UnmarshalJSON ¶
func (s *RebalanceAction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*RebalanceAction) UnmarshalText ¶
func (s *RebalanceAction) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (RebalanceAction) Validate ¶
func (s RebalanceAction) Validate() error
type RebalanceControlRequest ¶
type RebalanceControlRequest struct {
Action RebalanceAction `json:"action"`
}
Ref: #/components/schemas/RebalanceControlRequest
func (*RebalanceControlRequest) Decode ¶
func (s *RebalanceControlRequest) Decode(d *jx.Decoder) error
Decode decodes RebalanceControlRequest from json.
func (*RebalanceControlRequest) Encode ¶
func (s *RebalanceControlRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*RebalanceControlRequest) GetAction ¶
func (s *RebalanceControlRequest) GetAction() RebalanceAction
GetAction returns the value of Action.
func (*RebalanceControlRequest) MarshalJSON ¶
func (s *RebalanceControlRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RebalanceControlRequest) SetAction ¶
func (s *RebalanceControlRequest) SetAction(val RebalanceAction)
SetAction sets the value of Action.
func (*RebalanceControlRequest) UnmarshalJSON ¶
func (s *RebalanceControlRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*RebalanceControlRequest) Validate ¶
func (s *RebalanceControlRequest) Validate() error
type RebalanceState ¶
type RebalanceState string
Runner state on this node: "disabled" (not cluster mode), "idle" (never started since boot), "waiting" (campaigning for the cluster-wide slot behind another runner), "running", "paused" (stopped by an operator, resume cursor kept), "done" (last run completed) or "failed" (last run aborted with an error). Ref: #/components/schemas/RebalanceState
const ( RebalanceStateDisabled RebalanceState = "disabled" RebalanceStateIdle RebalanceState = "idle" RebalanceStateWaiting RebalanceState = "waiting" RebalanceStateRunning RebalanceState = "running" RebalanceStatePaused RebalanceState = "paused" RebalanceStateDone RebalanceState = "done" RebalanceStateFailed RebalanceState = "failed" )
func (RebalanceState) AllValues ¶
func (RebalanceState) AllValues() []RebalanceState
AllValues returns all RebalanceState values.
func (*RebalanceState) Decode ¶
func (s *RebalanceState) Decode(d *jx.Decoder) error
Decode decodes RebalanceState from json.
func (RebalanceState) Encode ¶
func (s RebalanceState) Encode(e *jx.Encoder)
Encode encodes RebalanceState as json.
func (RebalanceState) MarshalJSON ¶
func (s RebalanceState) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (RebalanceState) MarshalText ¶
func (s RebalanceState) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*RebalanceState) UnmarshalJSON ¶
func (s *RebalanceState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*RebalanceState) UnmarshalText ¶
func (s *RebalanceState) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (RebalanceState) Validate ¶
func (s RebalanceState) Validate() error
type RebalanceStatus ¶
type RebalanceStatus struct {
State RebalanceState `json:"state"`
// Objects processed by the current or last run on this node.
Objects int `json:"objects"`
// Objects the run changed (fragments moved, sidecars rewritten, old copies retired).
Relocated int `json:"relocated"`
// Objects whose repair errored; the run continues past them.
Failed int `json:"failed"`
// Persisted resume cursor: everything up to and including (bucket, key) is done.
CursorBucket OptString `json:"cursor_bucket"`
CursorKey OptString `json:"cursor_key"`
// When the current or last run started on this node.
StartedAt OptDateTime `json:"started_at"`
// When the last run ended on this node.
FinishedAt OptDateTime `json:"finished_at"`
// Why the last run failed, for state "failed".
ErrorMessage OptString `json:"error_message"`
// Pending async replication-remainder tasks on this node (repair backlog indicator).
RepairQueueDepth int `json:"repair_queue_depth"`
}
Ref: #/components/schemas/RebalanceStatus
func (*RebalanceStatus) Decode ¶
func (s *RebalanceStatus) Decode(d *jx.Decoder) error
Decode decodes RebalanceStatus from json.
func (*RebalanceStatus) Encode ¶
func (s *RebalanceStatus) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*RebalanceStatus) GetCursorBucket ¶
func (s *RebalanceStatus) GetCursorBucket() OptString
GetCursorBucket returns the value of CursorBucket.
func (*RebalanceStatus) GetCursorKey ¶
func (s *RebalanceStatus) GetCursorKey() OptString
GetCursorKey returns the value of CursorKey.
func (*RebalanceStatus) GetErrorMessage ¶
func (s *RebalanceStatus) GetErrorMessage() OptString
GetErrorMessage returns the value of ErrorMessage.
func (*RebalanceStatus) GetFailed ¶
func (s *RebalanceStatus) GetFailed() int
GetFailed returns the value of Failed.
func (*RebalanceStatus) GetFinishedAt ¶
func (s *RebalanceStatus) GetFinishedAt() OptDateTime
GetFinishedAt returns the value of FinishedAt.
func (*RebalanceStatus) GetObjects ¶
func (s *RebalanceStatus) GetObjects() int
GetObjects returns the value of Objects.
func (*RebalanceStatus) GetRelocated ¶
func (s *RebalanceStatus) GetRelocated() int
GetRelocated returns the value of Relocated.
func (*RebalanceStatus) GetRepairQueueDepth ¶
func (s *RebalanceStatus) GetRepairQueueDepth() int
GetRepairQueueDepth returns the value of RepairQueueDepth.
func (*RebalanceStatus) GetStartedAt ¶
func (s *RebalanceStatus) GetStartedAt() OptDateTime
GetStartedAt returns the value of StartedAt.
func (*RebalanceStatus) GetState ¶
func (s *RebalanceStatus) GetState() RebalanceState
GetState returns the value of State.
func (*RebalanceStatus) MarshalJSON ¶
func (s *RebalanceStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RebalanceStatus) SetCursorBucket ¶
func (s *RebalanceStatus) SetCursorBucket(val OptString)
SetCursorBucket sets the value of CursorBucket.
func (*RebalanceStatus) SetCursorKey ¶
func (s *RebalanceStatus) SetCursorKey(val OptString)
SetCursorKey sets the value of CursorKey.
func (*RebalanceStatus) SetErrorMessage ¶
func (s *RebalanceStatus) SetErrorMessage(val OptString)
SetErrorMessage sets the value of ErrorMessage.
func (*RebalanceStatus) SetFailed ¶
func (s *RebalanceStatus) SetFailed(val int)
SetFailed sets the value of Failed.
func (*RebalanceStatus) SetFinishedAt ¶
func (s *RebalanceStatus) SetFinishedAt(val OptDateTime)
SetFinishedAt sets the value of FinishedAt.
func (*RebalanceStatus) SetObjects ¶
func (s *RebalanceStatus) SetObjects(val int)
SetObjects sets the value of Objects.
func (*RebalanceStatus) SetRelocated ¶
func (s *RebalanceStatus) SetRelocated(val int)
SetRelocated sets the value of Relocated.
func (*RebalanceStatus) SetRepairQueueDepth ¶
func (s *RebalanceStatus) SetRepairQueueDepth(val int)
SetRepairQueueDepth sets the value of RepairQueueDepth.
func (*RebalanceStatus) SetStartedAt ¶
func (s *RebalanceStatus) SetStartedAt(val OptDateTime)
SetStartedAt sets the value of StartedAt.
func (*RebalanceStatus) SetState ¶
func (s *RebalanceStatus) SetState(val RebalanceState)
SetState sets the value of State.
func (*RebalanceStatus) UnmarshalJSON ¶
func (s *RebalanceStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*RebalanceStatus) Validate ¶
func (s *RebalanceStatus) Validate() error
type ReloadResult ¶
type ReloadResult struct {
// What the reload applied: any of "credentials", "tls".
Reloaded []string `json:"reloaded"`
// The config revision in effect after the reload (see InstanceInfo.config_revision).
ConfigRevision OptString `json:"config_revision"`
}
Ref: #/components/schemas/ReloadResult
func (*ReloadResult) Decode ¶
func (s *ReloadResult) Decode(d *jx.Decoder) error
Decode decodes ReloadResult from json.
func (*ReloadResult) Encode ¶
func (s *ReloadResult) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ReloadResult) GetConfigRevision ¶
func (s *ReloadResult) GetConfigRevision() OptString
GetConfigRevision returns the value of ConfigRevision.
func (*ReloadResult) GetReloaded ¶
func (s *ReloadResult) GetReloaded() []string
GetReloaded returns the value of Reloaded.
func (*ReloadResult) MarshalJSON ¶
func (s *ReloadResult) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ReloadResult) SetConfigRevision ¶
func (s *ReloadResult) SetConfigRevision(val OptString)
SetConfigRevision sets the value of ConfigRevision.
func (*ReloadResult) SetReloaded ¶
func (s *ReloadResult) SetReloaded(val []string)
SetReloaded sets the value of Reloaded.
func (*ReloadResult) UnmarshalJSON ¶
func (s *ReloadResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ReloadResult) Validate ¶
func (s *ReloadResult) Validate() error
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationGroup ¶
OperationGroup returns the x-ogen-operation-group value.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type Source ¶
type Source string
Where the credential is defined. Ref: #/components/schemas/Source
func (Source) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (Source) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*Source) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
func (*Source) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) ControlRebalance ¶
func (UnimplementedHandler) ControlRebalance(ctx context.Context, req *RebalanceControlRequest) (r *RebalanceStatus, _ error)
ControlRebalance implements controlRebalance operation.
Start, pause or resume the cluster-wide rebalance from this node. At most one rebalance runs cluster-wide (etcd election); starting on several nodes leaves the extras waiting as standby runners. Pausing stops this node's runner and keeps the resume cursor, so a later start/resume — on any node — continues where it left off.
POST /api/v1/cluster/rebalance
func (UnimplementedHandler) CreateAccessKey ¶
func (UnimplementedHandler) CreateAccessKey(ctx context.Context, req *CreateAccessKeyRequest) (r *CreatedAccessKey, _ error)
CreateAccessKey implements createAccessKey operation.
Create a runtime credential. The access key and secret are generated when not supplied. The secret is returned only in this response and cannot be retrieved later.
POST /api/v1/access-keys
func (UnimplementedHandler) DeleteAccessKey ¶
func (UnimplementedHandler) DeleteAccessKey(ctx context.Context, params DeleteAccessKeyParams) error
DeleteAccessKey implements deleteAccessKey operation.
Remove a runtime credential. Config-defined credentials cannot be deleted.
DELETE /api/v1/access-keys/{accessKey}
func (UnimplementedHandler) GetClusterStatus ¶
func (UnimplementedHandler) GetClusterStatus(ctx context.Context) (r *ClusterStatus, _ error)
GetClusterStatus implements getClusterStatus operation.
Cluster-wide view read from the control plane: the agreed schema version, every node with its disks and reported capacity, aggregate capacity, placement skew and whether a rebalance is currently running. State is "disabled" when the server is not in cluster mode.
GET /api/v1/cluster/status
func (UnimplementedHandler) GetInfo ¶
func (UnimplementedHandler) GetInfo(ctx context.Context) (r *InstanceInfo, _ error)
GetInfo implements getInfo operation.
Build information, uptime and whether authentication is enabled.
GET /api/v1/info
func (UnimplementedHandler) GetRebalanceStatus ¶
func (UnimplementedHandler) GetRebalanceStatus(ctx context.Context) (r *RebalanceStatus, _ error)
GetRebalanceStatus implements getRebalanceStatus operation.
State and progress of the cluster rebalance runner on this node, the persisted resume cursor and the depth of the async repair queue. State is "disabled" when the server is not in cluster mode.
GET /api/v1/cluster/rebalance
func (UnimplementedHandler) ListAccessKeys ¶
func (UnimplementedHandler) ListAccessKeys(ctx context.Context) (r *AccessKeyList, _ error)
ListAccessKeys implements listAccessKeys operation.
Every credential the server accepts, secrets omitted.
GET /api/v1/access-keys
func (UnimplementedHandler) NewError ¶
func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrorStatusCode)
NewError creates *ErrorStatusCode from error returned by handler.
Used for common default response.
func (UnimplementedHandler) ReloadConfig ¶
func (UnimplementedHandler) ReloadConfig(ctx context.Context) (r *ReloadResult, _ error)
ReloadConfig implements reloadConfig operation.
Re-read the configuration file and apply the parts that change without a restart — the config-defined credentials and grants, the anonymously readable buckets and the TLS certificate — exactly as SIGHUP does. Runtime credentials created through this API are preserved. Returns what was reloaded and the config revision now in effect, so an orchestrator can confirm a config change landed without shelling into the process. Returns 501 on a listener with nothing to reload (the headless cluster admin serves no S3 data).
POST /api/v1/reload
Source Files
¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_json_gen.go
- oas_labeler_gen.go
- oas_middleware_gen.go
- oas_operations_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go