Documentation ¶
Index ¶
- Constants
- type AuthConfig
- type CPHealthStatus
- type CapacityStats
- type ClusterHealthNode
- type ConnectivityResult
- type ConnectivityResults
- type DPHealthStatus
- type DeleteOptions
- type Deployment
- type Device
- type DriverInstance
- type DriverInstances
- type ErrorResponse
- type Event
- type EventType
- type FeatureType
- type HealthStatus
- type HealthSubmodules
- type Licence
- type LicenceKeyContainer
- type ListOptions
- type Logger
- type LoggerUpdateOptions
- type Maintenance
- type NamedSubModuleStatus
- type Namespace
- type NamespaceCreateOptions
- type Node
- type NodeConfig
- type NodeUpdateOptions
- type Operator
- type Policy
- type PolicySet
- type PolicyWithID
- type Pool
- type PoolOptions
- type Pools
- type Request
- type Rule
- type RuleCreateOptions
- type RuleUpdateOptions
- type Rules
- type SubModuleStatus
- type Template
- type TemplateCreateOptions
- type Templates
- type User
- type UserCreateOptions
- type VersionInfo
- type VersionResponse
- type Volume
- type VolumeCreateOptions
- type VolumeMountOptions
- type VolumeStats
- type VolumeUnmountOptions
- type VolumeUpdateOptions
Constants ¶
const ( RequestType EventType = "request" ResponseType = "response" HeartbeatType = "heartbeat" BackupType = "backup" )
EventTypes are added to events to assist with type assertions
const ( // HA means High Availability HA = FeatureType("HA") // DEV means developer licence DEV = FeatureType("DEV") // TRIAL means trial licence TRIAL = FeatureType("TRIAL") )
const DefaultNamespace = "default"
DefaultNamespace is used when a namespace hasn't been specified.
const ErrCapacityStatsUnchanged = "no changes"
ErrCapacityStatsUnchanged can be used when comparing stats
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct { Name string `json:"name,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Auth string `json:"auth,omitempty"` ServerAddress string `json:"serveraddress,omitempty"` // IdentityToken is used to authenticate the user and get // an access token for the registry. IdentityToken string `json:"identitytoken,omitempty"` }
AuthConfig contains authorization information for connecting to a Registry
type CPHealthStatus ¶
type CPHealthStatus struct { KV SubModuleStatus KVWrite SubModuleStatus NATS SubModuleStatus Scheduler SubModuleStatus }
func (*CPHealthStatus) ToNamedSubmodules ¶
func (c *CPHealthStatus) ToNamedSubmodules() []NamedSubModuleStatus
func (*CPHealthStatus) UnmarshalJSON ¶
func (c *CPHealthStatus) UnmarshalJSON(data []byte) error
type CapacityStats ¶
type CapacityStats struct { // TotalCapacityBytes is the object's total capacity in bytes. TotalCapacityBytes uint64 `json:"totalCapacityBytes"` // AvailableCapacityBytes is the object's available capacity in bytes. AvailableCapacityBytes uint64 `json:"availableCapacityBytes"` // ProvisionedCapacityBytes is the object's provisioned capacity in bytes. ProvisionedCapacityBytes uint64 `json:"provisionedCapacityBytes"` }
CapacityStats is used to report capacity statistics on pools and controllers.
func (CapacityStats) IsEqual ¶
func (c CapacityStats) IsEqual(n CapacityStats) bool
IsEqual checks if capacity values are the same
type ClusterHealthNode ¶
type ClusterHealthNode struct { NodeID string `json:"nodeID"` NodeName string `json:"nodeName"` Submodules struct { DirectFSInitiator SubModuleStatus `json:"directfs_initiator"` Director SubModuleStatus `json:"director"` KV SubModuleStatus `json:"kv"` KVWrite SubModuleStatus `json:"kv_write"` NATS SubModuleStatus `json:"nats"` Presentation SubModuleStatus `json:"presentation"` RDB SubModuleStatus `json:"rdb"` } `json:"submodules"` }
type ConnectivityResult ¶
type ConnectivityResult struct { // Label is a human-readable reference for the service being tested. Label string `json:"label"` // Address is the host:port of the service being tested. Address string `json:"address"` // Source is a human-readable reference for the source host where the tests // were run from. Source string `json:"source"` // LatencyNS is the duration in nanoseconds that the check took to complete. // Will also be set on unsuccessful attempts. LatencyNS time.Duration `json:"latency_ns"` // Error is set if the test returned an error. Error string `json:"error"` }
ConnectivityResult capture's a node connectivity report to a given target.
func (ConnectivityResult) IsOK ¶
func (r ConnectivityResult) IsOK() bool
IsOK returns true iff no error
type ConnectivityResults ¶
type ConnectivityResults []ConnectivityResult
ConnectivityResults is a collection of connectivty reports.
func (ConnectivityResults) IsOK ¶
func (r ConnectivityResults) IsOK() bool
IsOK returns true iff no error in any result.
type DPHealthStatus ¶
type DPHealthStatus struct { DirectFSClient SubModuleStatus DirectFSServer SubModuleStatus Director SubModuleStatus FSDriver SubModuleStatus FS SubModuleStatus }
func (*DPHealthStatus) ToNamedSubmodules ¶
func (d *DPHealthStatus) ToNamedSubmodules() []NamedSubModuleStatus
func (*DPHealthStatus) UnmarshalJSON ¶
func (d *DPHealthStatus) UnmarshalJSON(data []byte) error
type DeleteOptions ¶
type DeleteOptions struct { // Volume unique ID. // Read Only: true ID string `json:"id"` // Volume name. // Read Only: true Name string `json:"name"` // Namespace is the object scope, such as for teams and projects. Namespace string `json:"namespace"` // Force will cause the volume to be deleted even if it's in use. Force bool `json:"force"` // Context can be set with a timeout or can be used to cancel a request. Context context.Context `json:"-"` }
DeleteOptions are available parameters for deleting existing volumes.
type Deployment ¶
type Deployment struct { // Deployment unique ID // Read Only: true ID string `json:"id"` // Inode number // Read Only: true Inode uint32 `json:"inode"` // Node ID // Read Only: true Node string `json:"node"` // Node name // Read Only: true NodeName string `json:"nodeName"` // Health // Read Only: true Health string `json:"health"` // Status // Read Only: true Status string `json:"status"` // Created at // Read Only: true CreatedAt time.Time `json:"createdAt"` }
Deployment Volume master or replica deployment details. swagger:model Deployment
type Device ¶
type Device struct { ID string Labels map[string]string `json:"labels"` Status string `json:"status"` Identifier string `json:"identifier"` Class string `json:"class"` CapacityStats CapacityStats `json:"capacityStats"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
Device - device type
type DriverInstance ¶
type DriverInstance struct { // Instance unique ID. // Read Only: true ID string `json:"id"` // Instance name. Name string `json:"name"` // Instance description. Description string `json:"description"` // Flag describing whether the template is active. // Default: false Active bool `json:"active"` // Config is JSON struct that is passed directly to the driver. There is no // specific format, and the driver is responsible for validation. Config interface{} `json:"config"` // Labels define a list of labels that describe the driver instance. These // are inherited from the pool when the driver instance is created. Labels []string `json:"labels"` // ControllerName specifies the controller that this instance is running on. ControllerName string `json:"controllerName"` // PoolID refers to the pool that this driver instance relates to. PoolID string `json:"poolID"` // DriverName specifies which capacity driver this is an instance of. DriverName string `json:"driverName"` // CapacityStats tracks that capacity usage of this driver instance on the // current controller. CapacityStats CapacityStats `json:"capacityStats"` }
DriverInstance is used to define an instance of a storage capacity driver.
type DriverInstances ¶
type DriverInstances []*DriverInstance
DriverInstances is a collection of Driver instance objects.
func (*DriverInstances) Add ¶
func (i *DriverInstances) Add(new *DriverInstance)
Add a new instance to the list of instances.
func (*DriverInstances) Find ¶
func (i *DriverInstances) Find(pool string, driver string, controller string) *DriverInstance
Find an instance matching the parameters.
func (*DriverInstances) Remove ¶
func (i *DriverInstances) Remove(id string)
Remove an instance to the list of instances.
type ErrorResponse ¶
type ErrorResponse struct { // The error message. // Required: true Message string `json:"message"` }
ErrorResponse Represents an error. swagger:model ErrorResponse
type Event ¶
type Event struct { ID string `json:"id"` // Parent is used to specify parent event Parent string `json:"parent"` EventType EventType `json:"eventType"` Action string `json:"action"` Timestamp int64 `json:"timestamp"` Status string `json:"status"` Message string `json:"message"` Log []string `json:"log"` ProgressPercent int `json:"progressPercent"` CreatedBy string `json:"createdBy"` Target string `json:"target"` ActionPayload interface{} `json:"actionPayload"` // payload can be encoded into bytes as well ActionPayloadBytes []byte `json:"actionPayloadBts"` UpdatedAt time.Time `json:"updatedAt"` CreatedAt time.Time `json:"createdAt"` // retry related value Retry bool `json:"retry"` RetriedAt time.Time `json:"retriedAt"` Attempts int `json:"attempts"` // optional parameter Deadline time.Time `json:"deadline"` // optional events to dispatch Rollback []*Request `json:"rollback"` RollbackDone bool `json:"rollbackDone"` Subject string `json:"subject"` // or "queue" // controller ID which created this event OriginController string `json:"originController"` }
Event describes the fields that all events should implement. Event is intended to be inherherited in more specific Event types.
type HealthStatus ¶
type HealthStatus struct {
Submodules HealthSubmodules `json:"submodules"`
}
HealthStatus is the health status json object.
func (*HealthStatus) ToCPHealthStatus ¶
func (h *HealthStatus) ToCPHealthStatus() *CPHealthStatus
ToCPHealthStatus returns only CPHealthStatus from the HealthStatus.
func (*HealthStatus) ToDPHealthStatus ¶
func (h *HealthStatus) ToDPHealthStatus() *DPHealthStatus
ToDPHealthStatus returns only DPHealthStatus from the HealthStatus.
type HealthSubmodules ¶
type HealthSubmodules struct { KV SubModuleStatus `json:"kv,omitempty"` KVWrite SubModuleStatus `json:"kv_write,omitempty"` NATS SubModuleStatus `json:"nats,omitempty"` Scheduler SubModuleStatus `json:"scheduler,omitempty"` DirectFSClient SubModuleStatus `json:"directfs_initiator,omitempty"` DirectFSServer SubModuleStatus `json:"directfs_responder,omitempty"` Director SubModuleStatus `json:"director,omitempty"` FSDriver SubModuleStatus `json:"rdb,omitempty"` FS SubModuleStatus `json:"presentation,omitempty"` }
HealthSubmodules is the "submodules" attribuet of HealthStatus.
type Licence ¶
type Licence struct { ArrayUUID string `json:"arrayUUID,omitempty"` ClusterID string `json:"clusterID,omitempty"` CustomerID string `json:"customerID"` CustomerName string `json:"customerName"` Storage int `json:"storage"` ValidUntil time.Time `json:"validUntil"` LicenceType string `json:"licenceType"` Features map[FeatureType]bool `json:"features"` Unregistered bool `json:"unregistered"` }
Licence holds the information to be encoded in the licence key. It needs to be synced across the django server running on portal-API as well as the corresponding decoding package on the storageOS control plane
type LicenceKeyContainer ¶
type LicenceKeyContainer struct {
Key string `json:"key"`
}
LicenceKeyContainer - stores a licence key
type ListOptions ¶
type ListOptions struct { // FieldSelector restricts the list of returned objects by their fields. Defaults to everything. FieldSelector string // LabelSelector restricts the list of returned objects by their labels. Defaults to everything. LabelSelector string // Namespace is the object scope, such as for teams and projects. Namespace string // Context can be set with a timeout or can be used to cancel a request. Context context.Context }
ListOptions are optional parameters for finding and listing most objects.
type Logger ¶
type Logger struct { // Node name Node string `json:"node"` // Log level Level string `json:"level"` // Log filter Filter string `json:"filter"` // Log filters by category // Read Only: true Categories map[string]string `json:"categories"` }
Logger is the runtime configuration of the node's logging services. swagger:model Logger
type LoggerUpdateOptions ¶
type LoggerUpdateOptions struct { // Log level Level string `json:"level"` // Log filter Filter string `json:"filter"` // List of nodes to update. All if not set. Nodes []string `json:"nodes"` // List of fields to update. Must be set. Fields []string `json:"fields"` // Context can be set with a timeout or can be used to cancel a request. Context context.Context `json:"-"` }
LoggerUpdateOptions are the available parameters for updating loggers.
type Maintenance ¶
type Maintenance struct { Enabled bool `json:"enabled"` UpdatedBy string `json:"updatedBy"` UpdatedAt time.Time `json:"updatedAt"` }
Maintenance is used to place the cluster in maintenance mode.
type NamedSubModuleStatus ¶
type NamedSubModuleStatus struct { Name string SubModuleStatus }
type Namespace ¶
type Namespace struct { // Namespace unique ID. // Read Only: true ID string `json:"id"` // Namespace name. // Required: true Name string `json:"name"` // The optional DisplayName is how the project is displayed in the web console (defaults to name). DisplayName string `json:"displayName"` // Namespcae description. Description string `json:"description"` // User-defined key/value metadata. Labels map[string]string `json:"labels"` // When the namespace was created. // Read Only: true CreatedAt time.Time `json:"createdAt"` // User that created the namespace. // Read Only: true CreatedBy string `json:"createdBy"` // When the namespace was created. // Read Only: true UpdatedAt time.Time `json:"updatedAt"` }
Namespace is used to as a container to isolate namespace and rule obects.
type NamespaceCreateOptions ¶
type NamespaceCreateOptions struct { // Name is the name of the namespace to create. // Required: true Name string `json:"name"` // The optional DisplayName is how the project is displayed in the web console (defaults to name). DisplayName string `json:"displayName"` // Description describes the namespace. Description string `json:"description"` // Labels are user-defined key/value metadata. Labels map[string]string `json:"labels"` // Context can be set with a timeout or can be used to cancel a request. Context context.Context `json:"-"` }
NamespaceCreateOptions are available parameters for creating new namespaces.
type Node ¶
type Node struct { NodeConfig HostID uint32 `json:"hostID"` Name string `json:"name"` Description string `json:"description"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` Health string `json:"health"` HealthUpdatedAt time.Time `json:"healthUpdatedAt"` VersionInfo map[string]VersionInfo `json:"versionInfo"` Version string `json:"version"` Revision string // the GitCommit this maps to Scheduler bool `json:"scheduler"` Cordon bool `json:"cordon"` Drain bool `json:"drain"` VolumeStats VolumeStats `json:"volumeStats"` CapacityStats CapacityStats `json:"capacityStats"` }
Node represents a StorageOS cluster node.
type NodeConfig ¶
type NodeConfig struct { // UUID is the unique identifier of the node. It cannot be changed once set. ID string `json:"id,omitempty"` // Hostname of the node. Hostname string `json:"hostname"` // Address is is used for communication between nodes. // Nodes will fail to start if the address they first registered with // changes. This protects against the container being re-scheduled on a // different host. Nodes will typically use the host server's ip address, // running the docker container in -net host mode. Address string `json:"address"` // KvAddr is the address of the KV store to use for storing configuration. // It can include the address or FQDN with optional port. Defaults to // Address/ADVERTISE_IP. KvAddr string `json:"kvAddr"` // Port allocations APIPort int `json:"apiPort"` NatsPort int `json:"natsPort"` NatsClusterPort int `json:"natsClusterPort"` SerfPort int `json:"serfPort"` DFSPort int `json:"dfsPort"` KVPeerPort int `json:"kvPeerPort"` KVClientPort int `json:"kvClientPort"` Labels map[string]string `json:"labels"` LogLevel string `json:"logLevel"` // the level of the logs to outout LogFormat string `json:"logFormat"` // either text or json LogFilter string `json:"logFilter"` // used to discard messages based on the message's category // BindAddr is used to control the default address StorageOS binds to. This // should always be set to 0.0.0.0 (all interfaces). BindAddr string `json:"bindAddr"` // DeviceDir is where the volumes are exported. This directory must be // shared into the container using the rshared volume mount option. DeviceDir string `json:"deviceDir"` // Join existing cluster Join string `json:"join"` // Backend selects the KV backend, either embedded (testing only) or etcd. Backend string `json:"kvBackend"` // EnableDebug is used to enable various debugging features. Used by http // to enable debug endpoints and as a shortcut to enable debug logging. EnableDebug bool `json:"debug"` // Devices specify all devices that are available on the node. Devices []Device `json:"devices"` }
NodeConfig is a read-only representation of the node's configuration, set at start time by environment variables passed to the container or using defaults.
type NodeUpdateOptions ¶
type NodeUpdateOptions struct { // Node unique ID. // Read Only: true ID string `json:"id"` // Node name. // Read Only: true Name string `json:"name"` // Description of the node. Description string `json:"description"` // Labels are user-defined key/value metadata. Labels map[string]string `json:"labels"` // Cordon marks the node as unschedulable if true Cordon bool `json:"cordon"` Drain bool `json:"drain"` // Context can be set with a timeout or can be used to cancel a request. Context context.Context `json:"-"` }
NodeUpdateOptions are available parameters for updating existing nodes.
type Operator ¶
type Operator string
Operator represents a key/field's relationship to value(s). See labels.Requirement and fields.Requirement for more details.
type Policy ¶
type Policy struct { Spec struct { User string `json:"user,omitempty"` Group string `json:"group,omitempty"` Readonly bool `json:"readonly,omitempty"` APIGroup string `json:"apiGroup,omitempty"` Resource string `json:"resource,omitempty"` Namespace string `json:"namespace,omitempty"` NonResourcePath string `json:"nonResourcePath,omitempty"` } `json:"spec"` }
type PolicySet ¶
PolicySet is a representation of the data structure returned from the REST API
func (PolicySet) GetPoliciesWithID ¶
func (p PolicySet) GetPoliciesWithID() []*PolicyWithID
type PolicyWithID ¶
PolicyWithId is used as an internal type to render table formated versions of the json response
func (*PolicyWithID) MarshalJSON ¶
func (p *PolicyWithID) MarshalJSON() ([]byte, error)
MarshalJSON returns a marshaled copy of the internal policy object, so it is still valid to use with the REST API
type Pool ¶
type Pool struct { // Pool unique ID. // Read Only: true ID string `json:"id"` // Pool name. // Required: true Name string `json:"name"` // Pool description. Description string `json:"description"` // Default determines whether this pool is the default if a volume is // provisioned without a pool specified. There can only be one default pool. Default bool `json:"default"` NodeSelector string `json:"nodeSelector"` // DeviceSelector - specifies a selector to filter node devices based on their labels. // Only devices from nodes that are in the 'NodeNames' list can be selected DeviceSelector string `json:"deviceSelector"` // Populated by the system. Read-only. CapacityStats CapacityStats `json:"capacityStats"` // This field is computed based on NodeSelector value // Populated by the system. Read-only. Nodes []*Node `json:"nodes"` // Labels define a list of labels that describe the pool. Labels map[string]string `json:"labels"` }
Pool is used to define a capacity pool.
type PoolOptions ¶
type PoolOptions struct { ID string `json:"id"` Name string `json:"name"` // Pool description. Description string `json:"description"` // Default determines whether this pool is the default if a volume is // provisioned without a pool specified. There can only be one default pool. Default bool `json:"default"` NodeSelector string `json:"nodeSelector"` // DeviceSelector - specifies a selector to filter node devices based on their labels. // Only devices from nodes that are in the 'NodeNames' list can be selected DeviceSelector string `json:"deviceSelector"` // Labels define a list of labels that describe the pool. Labels map[string]string `json:"labels"` // Context can be set with a timeout or can be used to cancel a request. Context context.Context `json:"-"` }
PoolOptions are available parameters for creating or updating pools.
type Request ¶
type Request struct {
Event
}
Request is the message structure used for sending request events
type Rule ¶
type Rule struct { // Rule unique ID. // Read Only: true ID string `json:"id"` // Rule name. // Required: true Name string `json:"name"` // Namespace is the object name and authentication scope, such as for teams and projects. Namespace string `json:"namespace"` // Rule description. Description string `json:"description"` // Flag describing whether the rule is active. // Default: false Active bool `json:"active"` // Weight is used to determine order during rule processing. Rules with // heavier weights are processed later. // default: 0 Weight int `json:"weight"` // RuleAction controls whether the action is to add or remove a label from the // matching object(s). RuleAction string `json:"action"` // Selectors defines the list of labels that should trigger a rule. Selector string `json:"selector"` // Labels define the list of labels that will be added or removed from the // matching object(s). Labels map[string]string `json:"labels"` }
Rule is used to define a rule
type RuleCreateOptions ¶
type RuleCreateOptions struct { // Rule name. // Required: true Name string `json:"name"` // Namespace is the object name and authentication scope, such as for teams and projects. Namespace string `json:"namespace"` // Rule description. Description string `json:"description"` // Flag describing whether the rule is active. // Default: false Active bool `json:"active"` // Weight is used to determine order during rule processing. Rules with // heavier weights are processed later. // default: 0 Weight int `json:"weight"` // RuleAction controls whether the action is to add or remove a label from the // matching object(s). RuleAction string `json:"action"` // Selectors defines the list of labels that should trigger a rule. Selector string `json:"selector"` // Labels define the list of labels that will be added or removed from the // matching object(s). Labels map[string]string `json:"labels"` // Context can be set with a timeout or can be used to cancel a request. Context context.Context `json:"-"` }
RuleCreateOptions are available parameters for creating new rules.
type RuleUpdateOptions ¶
type RuleUpdateOptions struct { // Rule unique ID. // Read Only: true ID string `json:"id"` // Rule name. // Required: true Name string `json:"name"` // Namespace is the object name and authentication scope, such as for teams and projects. Namespace string `json:"namespace"` // Rule description. Description string `json:"description"` // Flag describing whether the rule is active. // Default: false Active bool `json:"active"` // Weight is used to determine order during rule processing. Rules with // heavier weights are processed later. // default: 0 Weight int `json:"weight"` // Operator is used to compare objects or labels. Operator string `json:"operator"` // RuleAction controls whether the action is to add or remove a label from the // matching object(s). RuleAction string `json:"action"` // Selectors defines the list of labels that should trigger a rule. Selector string `json:"selector"` // Labels define the list of labels that will be added or removed from the // matching object(s). Labels map[string]string `json:"labels"` // Context can be set with a timeout or can be used to cancel a request. Context context.Context `json:"-"` }
RuleUpdateOptions are available parameters for creating new rules.
type SubModuleStatus ¶
type Template ¶
type Template struct { // Template unique ID. // Read Only: true ID string `json:"id"` // Template name. // Required: true Name string `json:"name"` // Template description. Description string `json:"description"` // Template format. This is used for pattern matching against labels. Format string `json:"format"` // Autoincrement defines whether there is a dynamic numeric component in the // template that must auto-increment when objects with the same name already // exists. AutoIncrement bool `json:"autoIncrement"` // Padding determines whether a dynamic numeric component in the name should // be padded. // default: false Padding bool `json:"padding"` // PaddingLength sets the length of the padding. A Padding length of 3 would // set name similar to `abc001` for the first item. Ignored if Padding set to // `false`. PaddingLength int `json:"paddingLength"` // Flag describing whether the template is active. // Default: false Active bool `json:"active"` // Weight is used to determine order during template processing. Templates // with heavier weights are processed later. // default: 0 Weight int `json:"weight"` // ObjectTypes defines the type names that the template can be applied to. ObjectTypes []string `json:"objectTypes"` // Labels define a list of the labels that the object must have in order for // the template to be applied. Labels map[string]string `json:"labels"` }
Template is used to define an auto-naming rule.
type TemplateCreateOptions ¶
type TemplateCreateOptions struct { // Template name. // Required: true Name string `json:"name"` // Template description. Description string `json:"description"` // Template format. This is used for pattern matching against labels. Format string `json:"format"` // Autoincrement defines whether there is a dynamic numeric component in the // template that must auto-increment when objects with the same name already // exists. AutoIncrement bool `json:"autoIncrement"` // Padding determines whether a dynamic numeric component in the name should // be padded. // default: false Padding bool `json:"padding"` // PaddingLength sets the length of the padding. A Padding length of 3 would // set name similar to `abc001` for the first item. Ignored if Padding set to // `false`. PaddingLength int `json:"paddingLength"` // Flag describing whether the template is active. // Default: false Active bool `json:"active"` // Weight is used to determine order during template processing. Templates // with heavier weights are processed later. // default: 0 Weight int `json:"weight"` // ObjectTypes defines the type names that the template can be applied to. ObjectTypes []string `json:"objectTypes"` // Labels define a list of the labels that the object must have in order for // the template to be applied. Labels map[string]string `json:"labels"` // Context can be set with a timeout or can be used to cancel a request. Context context.Context `json:"-"` }
TemplateCreateOptions are available parameters for creating new templates.
type User ¶
type User struct { UUID string `json:"id"` Username string `json:"username"` Groups []string `json:"groups"` Password string `json:"password,omitempty"` Role string `json:"role"` }
func (*User) MarshalJSON ¶
func (*User) UnmarshalJSON ¶
type UserCreateOptions ¶
type UserCreateOptions struct { Username string `json:"username"` Groups []string `json:"groups"` Password string `json:"password"` Role string `json:"role"` // Context can be set with a timeout or can be used to cancel a request. Context context.Context `json:"-"` }
func (UserCreateOptions) MarshalJSON ¶
func (u UserCreateOptions) MarshalJSON() ([]byte, error)
type VersionInfo ¶
type VersionInfo struct { Name string `json:"name"` BuildDate string `json:"buildDate"` Revision string `json:"revision"` Version string `json:"version"` APIVersion string `json:"apiVersion"` GoVersion string `json:"goVersion"` OS string `json:"os"` Arch string `json:"arch"` KernelVersion string `json:"kernelVersion"` Experimental bool `json:"experimental"` }
VersionInfo describes version and runtime info.
type VersionResponse ¶
type VersionResponse struct { Client *VersionInfo Server *VersionInfo }
func (VersionResponse) ServerOK ¶
func (v VersionResponse) ServerOK() bool
ServerOK returns true when the client could connect to the docker server and parse the information received. It returns false otherwise.
type Volume ¶
type Volume struct { // Volume unique ID. // Read Only: true ID string `json:"id"` // Block device inode. // Read Only: true Inode uint32 `json:"inode"` // Volume name. // Required: true Name string `json:"name"` // Size in GB. // Required: true Size int `json:"size"` // Name of capacity pool to provision the volume in, or the name of the current pool. Pool string `json:"pool"` // Filesystem type to mount. May be set on create, or set by rules to influence client. FSType string `json:"fsType"` // Volume description. Description string `json:"description"` // User-defined key/value metadata. Labels map[string]string `json:"labels"` // Namespace is the object name and authentication scope, such as for teams and projects. Namespace string `json:"namespace"` // node selector (where volumes should land) NodeSelector string `json:"nodeSelector"` // Volume deployment information for the master volume. // Read Only: true Master *Deployment `json:"master,omitempty"` // Flag indicating if the volume is mounted and in use. // Read Only: true Mounted bool `json:"mounted"` // MountDevice, where the device is located MountDevice string `json:"mountDevice"` // Mountpoint, where the volume is mounted Mountpoint string `json:"mountpoint"` // When the volume was mounted. // Read Only: true MountedAt time.Time `json:"mountedAt,omitempty"` // Reference to the node that has the volume mounted. // Read Only: true MountedBy string `json:"mountedBy,omitempty"` // Volume deployment information for the replica volumes. // Read Only: true Replicas []*Deployment `json:"replicas"` // Volume health, one of: healthy, degraded or dead. // Read Only: true Health string `json:"health"` // Short status, one of: pending, evaluating, deploying, active, unavailable, failed, updating, deleting. // Read Only: true Status string `json:"status"` // Status message explaining current status. // Read Only: true StatusMessage string `json:"statusMessage"` // mkfs performed on new volumes MkfsDone bool `json:"mkfsDone"` MkfsDoneAt time.Time `json:"mkfsDoneAt"` // When the volume was created. // Read Only: true CreatedAt time.Time `json:"createdAt"` // User that created the volume. // Read Only: true CreatedBy string `json:"createdBy"` }
Volume represents storage volume. swagger:model Volume
type VolumeCreateOptions ¶
type VolumeCreateOptions struct { // Name is the name of the volume to create. // Required: true Name string `json:"name"` // Description describes the volume. Description string `json:"description"` // Size in GB. // Required: true Size int `json:"size"` // Pool is the name or id of capacity pool to provision the volume in. Pool string `json:"pool"` // Filesystem type to mount. May be set on create, or set by rules to influence client. FSType string `json:"fsType"` // Namespace is the object scope, such as for teams and projects. Namespace string `json:"namespace"` // node selector (where volumes should land) NodeSelector string `json:"nodeSelector"` // Labels are user-defined key/value metadata. Labels map[string]string `json:"labels"` // Context can be set with a timeout or can be used to cancel a request. Context context.Context `json:"-"` }
VolumeCreateOptions are available parameters for creating new volumes.
type VolumeMountOptions ¶
type VolumeMountOptions struct { // Volume unique ID. ID string `json:"id"` // Name is the name of the volume to mount. Name string `json:"name"` // Mountpoint, where the volume is mounted Mountpoint string `json:"mountpoint"` // Filesystem type, optional but expected when mounting raw volume FsType string `json:"fsType"` // Namespace is the object scope, such as for teams and projects. Namespace string `json:"namespace"` // The hostname of the client mounting the volume. Client string `json:"client"` // Context can be set with a timeout or can be used to cancel a request. Context context.Context `json:"-"` }
VolumeMountOptions - used by clients to inform of volume mount operations.
type VolumeStats ¶
type VolumeStats struct { MasterVolumeCount int `json:"masterVolumeCount"` ReplicaVolumeCount int `json:"replicaVolumeCount"` VirtualVolumeCount int `json:"virtualVolumeCount"` }
VolumeStats - volume stats (volume counts, looking forward to capacity)
type VolumeUnmountOptions ¶
type VolumeUnmountOptions struct { // Volume unique ID. ID string `json:"id"` // Name is the name of the volume to unmount. Name string `json:"name"` // Namespace is the object scope, such as for teams and projects. Namespace string `json:"namespace"` // The hostname of the client unmounting the volume. Must match the hostname // of the client that registered the mount operation. Client string `json:"client"` // Context can be set with a timeout or can be used to cancel a request. Context context.Context `json:"-"` }
VolumeUnmountOptions - used by clients to inform of volume mount operations.
type VolumeUpdateOptions ¶
type VolumeUpdateOptions struct { // Volume unique ID. // Read Only: true ID string `json:"id"` // Volume name. // Read Only: true Name string `json:"name"` // Description describes the volume. Description string `json:"description"` // Size in GB. // Required: true Size int `json:"size"` // Namespace is the object scope, such as for teams and projects. Namespace string `json:"namespace"` // node selector (where volumes should land) NodeSelector string `json:"nodeSelector"` // Labels are user-defined key/value metadata. Labels map[string]string `json:"labels"` // Context can be set with a timeout or can be used to cancel a request. Context context.Context `json:"-"` }
VolumeUpdateOptions are available parameters for updating existing volumes.
Source Files ¶
- auth.go
- capacity_stats.go
- cluster.go
- connectivity.go
- delete_options.go
- deployment.go
- driver_instance.go
- error_response.go
- events.go
- health.go
- licence.go
- list_options.go
- logger.go
- namespace.go
- node.go
- node_update_options.go
- operator.go
- policy.go
- pool.go
- pool_options.go
- rule.go
- template.go
- template_create_options.go
- user.go
- version.go
- volume.go
- volume_create_options.go
- volume_stats.go
- volume_update_options.go