model

package
v0.6.1 Latest Latest
Warning

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

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

Documentation

Overview

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	Port = 8124
)
View Source
const RGWPort = 53390

Variables

This section is empty.

Functions

func HealthStatusToString

func HealthStatusToString(hs HealthStatus) string

func NodeStateToString

func NodeStateToString(state NodeState) string

func PoolTypeToString

func PoolTypeToString(poolType PoolType) string

Types

type BlockImage

type BlockImage struct {
	Name       string `json:"imageName"`
	PoolName   string `json:"poolName"`
	Size       uint64 `json:"size"`
	Device     string `json:"device"`
	MountPoint string `json:"mountPoint"`
}

type ClientAccessInfo added in v0.1.1

type ClientAccessInfo struct {
	MonAddresses []string `json:"monAddresses"`
	UserName     string   `json:"userName"`
	SecretKey    string   `json:"secretKey"`
}

type DevicePathFinder added in v0.6.0

type DevicePathFinder interface {
	FindDevicePath(image, pool, clusterName string) (string, error)
}

DevicePathFinder is used to find the device path after the volume has been attached

type ErasureCodedPoolConfig

type ErasureCodedPoolConfig struct {
	DataChunkCount   uint   `json:"dataChunkCount"`
	CodingChunkCount uint   `json:"codingChunkCount"`
	Algorithm        string `json:"algorithm"`
}

type Filesystem added in v0.1.1

type Filesystem struct {
	Name         string   `json:"name"`
	MetadataPool string   `json:"metadataPool"`
	DataPools    []string `json:"dataPools"`
}

type FilesystemRequest added in v0.1.1

type FilesystemRequest struct {
	Name           string         `json:"name"`
	DataPools      []Pool         `json:"dataPools"`
	MetadataPool   Pool           `json:"metadataPool"`
	MetadataServer MetadataServer `json:"metadataServer"`
}

type Gateway added in v0.6.0

type Gateway struct {
	Port           int32  `json:"port"`
	SecurePort     int32  `json:"securePort"`
	Instances      int32  `json:"instances"`
	AllNodes       bool   `json:"allNodes"`
	Certificate    string `json:"certificate"`
	CertificateRef string `json:"certificateRef"`
}

type HealthStatus

type HealthStatus int
const (
	HealthOK HealthStatus = iota
	HealthWarning
	HealthError
	HealthUnknown
)

type MetadataServer added in v0.6.0

type MetadataServer struct {
	ActiveCount int32 `json:"activeCount"`
}

type MgrSummary added in v0.5.0

type MgrSummary struct {
	ActiveName string   `json:"active_name"`
	ActiveAddr string   `json:"active_addr"`
	Available  bool     `json:"available"`
	Standbys   []string `json:"standbys"`
}

type MonitorSummary

type MonitorSummary struct {
	Name     string       `json:"name"`
	Address  string       `json:"address"`
	InQuorum bool         `json:"inQuorum"`
	Status   HealthStatus `json:"status"`
}

type Node

type Node struct {
	NodeID      string        `json:"nodeId"`
	ClusterName string        `json:"clusterName"`
	PublicIP    string        `json:"publicIp"`
	PrivateIP   string        `json:"privateIp"`
	Storage     uint64        `json:"storage"`
	LastUpdated time.Duration `json:"lastUpdated"`
	State       NodeState     `json:"state"`
	Location    string        `json:"location"`
}

type NodeState

type NodeState int
const (
	Healthy NodeState = iota
	Unhealthy
)

type OSDSummary

type OSDSummary struct {
	Total    int  `json:"total"`
	NumberIn int  `json:"numIn"`
	NumberUp int  `json:"numUp"`
	Full     bool `json:"full"`
	NearFull bool `json:"nearFull"`
}

type ObjectBucket added in v0.3.0

type ObjectBucket struct {
	Name string `json:"name"`
	ObjectBucketMetadata
	ObjectBucketStats
}

type ObjectBucketMetadata added in v0.5.0

type ObjectBucketMetadata struct {
	Owner     string    `json:"owner"`
	CreatedAt time.Time `json:"createdAt"`
}

type ObjectBucketStats added in v0.3.0

type ObjectBucketStats struct {
	Size            uint64 `json:"size"`
	NumberOfObjects uint64 `json:"numberOfObjects"`
}

type ObjectBuckets added in v0.3.0

type ObjectBuckets []ObjectBucket

func (ObjectBuckets) Len added in v0.3.0

func (slice ObjectBuckets) Len() int

func (ObjectBuckets) Less added in v0.3.0

func (slice ObjectBuckets) Less(i, j int) bool

func (ObjectBuckets) Swap added in v0.3.0

func (slice ObjectBuckets) Swap(i, j int)

type ObjectStore added in v0.6.0

type ObjectStore struct {
	Name           string  `json:"name"`
	DataConfig     Pool    `json:"dataConfig"`
	MetadataConfig Pool    `json:"metadataConfig"`
	Gateway        Gateway `json:"gateway"`
}

type ObjectStoreConnectInfo added in v0.3.0

type ObjectStoreConnectInfo struct {
	Host      string  `json:"host"`
	IPAddress string  `json:"ipAddress"`
	Ports     []int32 `json:"ports"`
}

type ObjectStoreResponse added in v0.6.0

type ObjectStoreResponse struct {
	Name        string           `json:"name"`
	ClusterIP   string           `json:"clusterIP"`
	ExternalIPs []string         `json:"externalIPs"`
	Ports       []v1.ServicePort `json:"ports"`
}

type ObjectUser added in v0.3.0

type ObjectUser struct {
	UserID      string  `json:"userId"`
	DisplayName *string `json:"displayName"`
	Email       *string `json:"email"`
	AccessKey   *string `json:"accessKey"`
	SecretKey   *string `json:"secretKey"`
}

type PGSummary

type PGSummary struct {
	Total       int            `json:"total"`
	StateCounts map[string]int `json:"stateCount"`
}

type Pool

type Pool struct {
	Name               string                 `json:"poolName"`
	Number             int                    `json:"poolNum"`
	Type               PoolType               `json:"type"`
	FailureDomain      string                 `json:"failureDomain"`
	ReplicatedConfig   ReplicatedPoolConfig   `json:"replicatedConfig"`
	ErasureCodedConfig ErasureCodedPoolConfig `json:"erasureCodedConfig"`
}

type PoolType

type PoolType int
const (
	Replicated PoolType = iota
	ErasureCoded
	PoolTypeUnknown
)

type ReplicatedPoolConfig

type ReplicatedPoolConfig struct {
	Size uint `json:"size"`
}

type StatusDetails

type StatusDetails struct {
	OverallStatus   HealthStatus     `json:"overall"`
	SummaryMessages []StatusSummary  `json:"summary"`
	Monitors        []MonitorSummary `json:"monitors"`
	OSDs            OSDSummary       `json:"osd"`
	PGs             PGSummary        `json:"pg"`
	Mgrs            MgrSummary       `json:"mgr"`
	Usage           UsageSummary     `json:"usage"`
}

type StatusSummary

type StatusSummary struct {
	Name    string       `json:"name"`
	Status  HealthStatus `json:"status"`
	Message string       `json:"message"`
}

type UsageSummary

type UsageSummary struct {
	DataBytes      uint64 `json:"data"`
	UsedBytes      uint64 `json:"used"`
	AvailableBytes uint64 `json:"available"`
	TotalBytes     uint64 `json:"total"`
}

Jump to

Keyboard shortcuts

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