Documentation
¶
Index ¶
- type Client
- func (c *Client) GetAllMetadata() ([]*Metadata, error)
- func (c *Client) GetAllRoutes() ([]*Routes, error)
- func (c *Client) GetMetadataConfig(cName string) (*MetadataConfig, error)
- func (c *Client) GetMetadataStatus(cName string) (*MetadataStatus, error)
- func (c *Client) GetRouteConnections(rName string) ([]*RouteConnections, error)
- func (c *Client) GetRouteDestinations(rName string) ([]*RouteDestinations, error)
- func (c *Client) GetRouteHealth(rName string) (*RouteHealth, error)
- func (c *Client) GetRouteStatus(rName string) (*RouteStatus, error)
- func (c *Client) GetRouterStatus() (*Router, error)
- type Metadata
- type MetadataConfig
- type MetadataNode
- type MetadataResponse
- type MetadataStatus
- type Options
- type RouteConnections
- type RouteConnectionsResponse
- type RouteDestinations
- type RouteDestinationsResponse
- type RouteHealth
- type RouteStatus
- type Router
- type Routes
- type RoutesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client holds the configuration for 20190715 version API client.
func (*Client) GetAllMetadata ¶
GetAllMetadata returns all metadata.
func (*Client) GetAllRoutes ¶
GetAllRoutes returns all routes.
func (*Client) GetMetadataConfig ¶
func (c *Client) GetMetadataConfig(cName string) (*MetadataConfig, error)
GetMetadataConfig returns the configuration of metadata.
func (*Client) GetMetadataStatus ¶
func (c *Client) GetMetadataStatus(cName string) (*MetadataStatus, error)
GetMetadataStatus returns the state of metadata.
func (*Client) GetRouteConnections ¶
func (c *Client) GetRouteConnections(rName string) ([]*RouteConnections, error)
GetRouteConnections return connections of the route.
func (*Client) GetRouteDestinations ¶
func (c *Client) GetRouteDestinations(rName string) ([]*RouteDestinations, error)
GetRouteDestinations returns destinations of the route.
func (*Client) GetRouteHealth ¶
func (c *Client) GetRouteHealth(rName string) (*RouteHealth, error)
GetRouteHealth returns the health check of the route.
func (*Client) GetRouteStatus ¶
func (c *Client) GetRouteStatus(rName string) (*RouteStatus, error)
GetRouteStatus return the status of the route.
func (*Client) GetRouterStatus ¶
GetRouterStatus returns information of MySQL Router
type Metadata ¶
type Metadata struct {
Name string `json:"name"`
}
Metadata is the structure of getting all metadata endpoint.
type MetadataConfig ¶
type MetadataConfig struct { ClusterName string `json:"clusterName"` TimeRefreshInMs int `json:"timeRefreshInMs"` GroupReplicationID string `json:"groupReplicationId"` Nodes []MetadataNode `json:"nodes"` }
MetadataConfig is the structure of the configuration of metadata.
type MetadataNode ¶
MetadataNode is the structure of metadata of a node.
type MetadataResponse ¶
type MetadataResponse struct {
Item []*Metadata `json:"items"`
}
MetadataResponse is the response of getting all metadata endpoint.
type MetadataStatus ¶
type MetadataStatus struct { RefreshFailed int `json:"refreshFailed"` RefreshSucceeded int `json:"refreshSucceeded"` TimeLastRefreshSucceeded time.Time `json:"timeLastRefreshSucceeded"` LastRefreshHostname string `json:"lastRefreshHostname"` LastRefreshPort int `json:"lastRefreshPort"` }
MetadataStatus is the structure of the information of metadata.
type RouteConnections ¶
type RouteConnections struct { BytesFromServer int `json:"bytesFromServer"` BytesToServer int `json:"bytesToServer"` SourceAddress string `json:"sourceAddress"` DestinationAddress string `json:"destinationAddress"` TimeStarted time.Time `json:"timeStarted"` TimeConnectedToServer time.Time `json:"timeConnectedToServer"` TimeLastSentToServer time.Time `json:"timeLastSentToServer"` TimeLastReceivedFromServer time.Time `json:"timeLastReceivedFromServer"` }
RouteConnections is the structure of the information of the connection of route.
type RouteConnectionsResponse ¶
type RouteConnectionsResponse struct {
Item []*RouteConnections `json:"items"`
}
RouteConnectionsResponse is the response of getting the information of route connection endpoint.
type RouteDestinations ¶
RouteDestinations is the structure of destination of the route.
type RouteDestinationsResponse ¶
type RouteDestinationsResponse struct {
Item []*RouteDestinations `json:"items"`
}
RouteDestinationsResponse is the response of getting the information of the route destination endpoint.
type RouteHealth ¶
type RouteHealth struct {
IsAlive bool `json:"isAlive"`
}
RouteHealth is the structure of health check of the route.
type RouteStatus ¶
type RouteStatus struct { ActiveConnections int `json:"activeConnections"` TotalConnections int `json:"totalConnections"` BlockedHosts int `json:"blockedHosts"` }
RouteStatus is the state of the route.
type Router ¶
type Router struct { ProcessID int `json:"processId"` ProductEdition string `json:"productEdition"` TimeStarted time.Time `json:"timeStarted"` Version string `json:"version"` Hostname string `json:"hostname"` }
Router general information of MySQL Router
type Routes ¶
type Routes struct {
Name string `json:"name"`
}
Routes is the response of getting all routes endpoint.
type RoutesResponse ¶
type RoutesResponse struct {
Item []*Routes `json:"items"`
}
RoutesResponse is the response of getting all routes endpoint.