Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) CreateNode(ctx context.Context, req *CreateNodeRequest) (*CreateNodeResponse, error)
- func (c *Client) DeleteNode(ctx context.Context, nodeID string) error
- func (c *Client) GetNode(ctx context.Context, nodeID string) (*NodeItem, error)
- func (c *Client) ListAllNodes(ctx context.Context) ([]*NodeItem, error)
- func (c *Client) UpdateNode(ctx context.Context, nodeID string, req *UpdateNodeRequest) (*UpdateNodeResponse, error)
- type CompatibilityIssue
- type CompatibilityState
- type CompatibilityStatus
- type CreateNodeRequest
- type CreateNodeResponse
- type IngressControllerState
- type KongResource
- type ListNodeResponse
- type NodeItem
- type PaginationInfo
- type UpdateNodeRequest
- type UpdateNodeResponse
Constants ¶
View Source
const ( // NodeTypeIngressController is the type of nodes representing KIC instances. NodeTypeIngressController = "ingress-controller" // NodeTypeKongProxy is the type of nodes representing kong gateway instances. NodeTypeKongProxy = "kong-proxy" )
Variables ¶
View Source
var KicNodeAPIPathPattern = "%s/kic/api/runtime_groups/%s/v1/kic-nodes"
KicNodeAPIPathPattern is the path pattern for KIC node operations.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is used for sending requests to Konnect Node API. It can be used to register Nodes in Konnect's Runtime Groups.
func NewClient ¶
func NewClient(cfg adminapi.KonnectConfig) (*Client, error)
NewClient creates a Node API Konnect client.
func (*Client) CreateNode ¶
func (c *Client) CreateNode(ctx context.Context, req *CreateNodeRequest) (*CreateNodeResponse, error)
func (*Client) ListAllNodes ¶
ListAllNodes call ListNodes() repeatedly to get all nodes in a runtime group.
func (*Client) UpdateNode ¶
func (c *Client) UpdateNode(ctx context.Context, nodeID string, req *UpdateNodeRequest) (*UpdateNodeResponse, error)
type CompatibilityIssue ¶
type CompatibilityIssue struct {
Code string `json:"code"`
Severity string `json:"severity"`
Description string `json:"description"`
Resolution string `json:"resolution"`
AffectedResources []*KongResource `json:"affected_resources"`
}
type CompatibilityState ¶
type CompatibilityState string
const ( CompatibilityStateUnspecified CompatibilityState = "COMPATIBILITY_STATE_UNSPECIFIED" CompatibilityStateFullyCompatible CompatibilityState = "COMPATIBILITY_STATE_FULLY_COMPATIBLE" CompatibilityStateInconpatible CompatibilityState = "COMPATIBILITY_STATE_INCOMPATIBLE" CompatibilityStateUnknown CompatibilityState = "COMPATIBILITY_STATE_UNKNOWN" )
type CompatibilityStatus ¶
type CompatibilityStatus struct {
State CompatibilityState `json:"state"`
Issues []*CompatibilityIssue `json:"issues,omitempty"`
}
type CreateNodeRequest ¶
type CreateNodeRequest struct {
ID string `json:"id,omitempty"`
Hostname string `json:"hostname"`
Type string `json:"type"`
LastPing int64 `json:"last_ping"`
Version string `json:"version"`
CompatabilityStatus *CompatibilityStatus `json:"compatibility_status,omitempty"`
Status string `json:"status,omitempty"`
ConfigHash string `json:"config_hash,omitempty"`
}
type CreateNodeResponse ¶
type CreateNodeResponse struct {
Item *NodeItem `json:"item"`
}
type IngressControllerState ¶
type IngressControllerState string
const ( IngressControllerStateUnspecified IngressControllerState = "INGRESS_CONTROLLER_STATE_UNSPECIFIED" IngressControllerStateOperational IngressControllerState = "INGRESS_CONTROLLER_STATE_OPERATIONAL" IngressControllerStatePartialConfigFail IngressControllerState = "INGRESS_CONTROLLER_STATE_PARTIAL_CONFIG_FAIL" IngressControllerStateInoperable IngressControllerState = "INGRESS_CONTROLLER_STATE_INOPERABLE" IngressControllerStateOperationalKonnectOutOfSync IngressControllerState = "INGRESS_CONTROLLER_STATE_OPERATIONAL_KONNECT_OUT_OF_SYNC" IngressControllerStatePartialConfigFailKonnectOutOfSync IngressControllerState = "INGRESS_CONTROLLER_STATE_PARTIAL_CONFIG_FAIL_KONNECT_OUT_OF_SYNC" IngressControllerStateInoperableKonnectOutOfSync IngressControllerState = "INGRESS_CONTROLLER_STATE_INOPERABLE_KONNECT_OUT_OF_SYNC" IngressControllerStateUnknown IngressControllerState = "INGRESS_CONTROLLER_STATE_UNKNOWN" )
type KongResource ¶
type ListNodeResponse ¶
type ListNodeResponse struct {
Items []*NodeItem `json:"items"`
Page *PaginationInfo `json:"page"`
}
type NodeItem ¶
type NodeItem struct {
ID string `json:"id"`
Version string `json:"version"`
Hostname string `json:"hostname"`
LastPing int64 `json:"last_ping"`
Type string `json:"type"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
ConfigHash string `json:"config_hash"`
CompatibilityStatus *CompatibilityStatus `json:"compatibility_status,omitempty"`
Status string `json:"status,omitempty"`
}
type PaginationInfo ¶
type UpdateNodeRequest ¶
type UpdateNodeRequest struct {
Hostname string `json:"hostname"`
Type string `json:"type"`
LastPing int64 `json:"last_ping"`
Version string `json:"version"`
ConfigHash string `json:"config_hash,omitempty"`
CompatabilityStatus *CompatibilityStatus `json:"compatibility_status,omitempty"`
Status string `json:"status,omitempty"`
}
type UpdateNodeResponse ¶
type UpdateNodeResponse struct {
Item *NodeItem `json:"item"`
}
Click to show internal directories.
Click to hide internal directories.