Documentation ¶
Index ¶
- Constants
- type ControllerRestClient
- func (c *ControllerRestClient) CreateNode(ctx context.Context, node *utils.Node) (CreateNodeResponse, error)
- func (c *ControllerRestClient) DeleteNode(ctx context.Context, name string) error
- func (c *ControllerRestClient) GetChap(ctx context.Context, volume, node string) (*utils.IscsiChapInfo, error)
- func (c *ControllerRestClient) GetNodes(ctx context.Context) ([]string, error)
- func (c *ControllerRestClient) InvokeAPI(ctx context.Context, requestBody []byte, method, resourcePath string, ...) (*http.Response, []byte, error)
- type CreateNodeResponse
- type GetCHAPResponse
- type ListNodesResponse
- type TridentController
Constants ¶
View Source
const HTTPClientTimeout = time.Second * 30
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerRestClient ¶
type ControllerRestClient struct {
// contains filtered or unexported fields
}
func (*ControllerRestClient) CreateNode ¶
func (c *ControllerRestClient) CreateNode(ctx context.Context, node *utils.Node) (CreateNodeResponse, error)
CreateNode registers the node with the CSI controller server
func (*ControllerRestClient) DeleteNode ¶
func (c *ControllerRestClient) DeleteNode(ctx context.Context, name string) error
DeleteNode deregisters the node with the CSI controller server
func (*ControllerRestClient) GetChap ¶
func (c *ControllerRestClient) GetChap(ctx context.Context, volume, node string) (*utils.IscsiChapInfo, error)
GetChap requests the current CHAP credentials for a given volume/node pair from the Trident controller
func (*ControllerRestClient) GetNodes ¶
func (c *ControllerRestClient) GetNodes(ctx context.Context) ([]string, error)
GetNodes returns a list of nodes registered with the controller
func (*ControllerRestClient) InvokeAPI ¶
func (c *ControllerRestClient) InvokeAPI( ctx context.Context, requestBody []byte, method, resourcePath string, redactRequestBody, redactResponseBody bool, ) (*http.Response, []byte, error)
InvokeAPI makes a REST call to the CSI Controller REST endpoint. The body must be a marshaled JSON byte array ( or nil). The method is the HTTP verb (i.e. GET, POST, ...). The resource path is appended to the base URL to identify the desired server resource; it should start with '/'.
type CreateNodeResponse ¶
type GetCHAPResponse ¶
type GetCHAPResponse struct { CHAP *utils.IscsiChapInfo `json:"chap"` Error string `json:"error,omitempty"` }
type ListNodesResponse ¶
type TridentController ¶
type TridentController interface { InvokeAPI( ctx context.Context, requestBody []byte, method, resourcePath string, redactRequestBody, redactResponseBody bool, ) (*http.Response, []byte, error) CreateNode(ctx context.Context, node *utils.Node) (CreateNodeResponse, error) GetNodes(ctx context.Context) ([]string, error) DeleteNode(ctx context.Context, name string) error GetChap(ctx context.Context, volume, node string) (*utils.IscsiChapInfo, error) }
func CreateTLSRestClient ¶
func CreateTLSRestClient(url, caFile, certFile, keyFile string) (TridentController, error)
Click to show internal directories.
Click to hide internal directories.