ceph

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(c HTTPClient) *Client

func (*Client) CmdSafety

func (c *Client) CmdSafety(ctx context.Context, req *CmdSafetyRequest) (*CmdSafetyResponse, error)

CmdSafety Heuristical check if it is safe to perform an action.

func (*Client) Config

func (c *Client) Config(ctx context.Context, req *ConfigRequest) (*ConfigResponse, error)

Config Get Ceph configuration.

func (*Client) Configdb

func (c *Client) Configdb(ctx context.Context, req *ConfigdbRequest) (*ConfigdbResponse, error)

Configdb Get Ceph configuration database.

func (*Client) Crush

func (c *Client) Crush(ctx context.Context, req *CrushRequest) (*CrushResponse, error)

Crush Get OSD crush map

func (*Client) Index

func (c *Client) Index(ctx context.Context, req *IndexRequest) (*IndexResponse, error)

Index Directory index.

func (*Client) Init

func (c *Client) Init(ctx context.Context, req *InitRequest) (*InitResponse, error)

Init Create initial ceph default configuration and setup symlinks.

func (*Client) Log

func (c *Client) Log(ctx context.Context, req *LogRequest) (*LogResponse, error)

Log Read ceph log

func (*Client) Restart

func (c *Client) Restart(ctx context.Context, req *RestartRequest) (*RestartResponse, error)

Restart Restart ceph services.

func (*Client) Rules

func (c *Client) Rules(ctx context.Context, req *RulesRequest) (*RulesResponse, error)

Rules List ceph rules.

func (*Client) Start

func (c *Client) Start(ctx context.Context, req *StartRequest) (*StartResponse, error)

Start Start ceph services.

func (*Client) Status

func (c *Client) Status(ctx context.Context, req *StatusRequest) (*StatusResponse, error)

Status Get ceph status.

func (*Client) Stop

func (c *Client) Stop(ctx context.Context, req *StopRequest) (*StopResponse, error)

Stop Stop ceph services.

type CmdSafetyRequest

type CmdSafetyRequest struct {
	Action  string `url:"action",json:"action"`   // Action to check
	Id      string `url:"id",json:"id"`           // ID of the service
	Node    string `url:"node",json:"node"`       // The cluster node name.
	Service string `url:"service",json:"service"` // Service type

}

type CmdSafetyResponse

type CmdSafetyResponse struct {
	Safe bool `url:"safe",json:"safe"` // If it is safe to run the command.

	// The following parameters are optional
	Status *string `url:"status,omitempty",json:"status,omitempty"` // Status message given by Ceph.
}

type ConfigRequest

type ConfigRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

}

type ConfigResponse

type ConfigResponse string

type ConfigdbRequest

type ConfigdbRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

}

type ConfigdbResponse

type ConfigdbResponse []*struct {
	CanUpdateAtRuntime bool   `url:"can_update_at_runtime",json:"can_update_at_runtime"`
	Level              string `url:"level",json:"level"`
	Mask               string `url:"mask",json:"mask"`
	Name               string `url:"name",json:"name"`
	Section            string `url:"section",json:"section"`
	Value              string `url:"value",json:"value"`
}

type CrushRequest

type CrushRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

}

type CrushResponse

type CrushResponse string

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type IndexRequest

type IndexRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

}

type IndexResponse

type IndexResponse []*map[string]interface{}

type InitRequest

type InitRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

	// The following parameters are optional
	ClusterNetwork *string `url:"cluster-network,omitempty",json:"cluster-network,omitempty"` // Declare a separate cluster network, OSDs will routeheartbeat, object replication and recovery traffic over it
	DisableCephx   *bool   `url:"disable_cephx,omitempty",json:"disable_cephx,omitempty"`     // Disable cephx authentication.WARNING: cephx is a security feature protecting against man-in-the-middle attacks. Only consider disabling cephx if your network is private!
	MinSize        *int    `url:"min_size,omitempty",json:"min_size,omitempty"`               // Minimum number of available replicas per object to allow I/O
	Network        *string `url:"network,omitempty",json:"network,omitempty"`                 // Use specific network for all ceph related traffic
	PgBits         *int    `url:"pg_bits,omitempty",json:"pg_bits,omitempty"`                 // Placement group bits, used to specify the default number of placement groups.NOTE: 'osd pool default pg num' does not work for default pools.
	Size           *int    `url:"size,omitempty",json:"size,omitempty"`                       // Targeted number of replicas per object
}

type InitResponse

type InitResponse map[string]interface{}

type LogRequest

type LogRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

	// The following parameters are optional
	Limit *int `url:"limit,omitempty",json:"limit,omitempty"`
	Start *int `url:"start,omitempty",json:"start,omitempty"`
}

type LogResponse

type LogResponse []*struct {
	N int    `url:"n",json:"n"` // Line number
	T string `url:"t",json:"t"` // Line text

}

type RestartRequest

type RestartRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

	// The following parameters are optional
	Service *string `url:"service,omitempty",json:"service,omitempty"` // Ceph service name.
}

type RestartResponse

type RestartResponse string

type RulesRequest

type RulesRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

}

type RulesResponse

type RulesResponse []*map[string]interface{}

type StartRequest

type StartRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

	// The following parameters are optional
	Service *string `url:"service,omitempty",json:"service,omitempty"` // Ceph service name.
}

type StartResponse

type StartResponse string

type StatusRequest

type StatusRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

}

type StatusResponse

type StatusResponse map[string]interface{}

type StopRequest

type StopRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

	// The following parameters are optional
	Service *string `url:"service,omitempty",json:"service,omitempty"` // Ceph service name.
}

type StopResponse

type StopResponse string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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