Documentation
¶
Overview ¶
Package lbapi provides a client for interacting with the load balancer api
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( errors.New("client is unauthorized") // ErrNotfound returned when the load balancer ID not found ErrLBNotfound = errors.New("loadbalancer ID not found") // ErrLBHTTPError returned when the http response is an error ErrHTTPError = errors.New("loadbalancer api http error") )ErrUnauthorized =
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client creates a new lb api client against a specific endpoint
func NewClient ¶
func NewClient(url string, opts ...ClientOption) *Client
NewClient creates a new lb api client
func (*Client) GetLoadBalancer ¶
GetLoadBalancer returns a load balancer by id
type ClientOption ¶
type ClientOption func(*Client)
ClientOption is a function that modifies a client
func WithHTTPClient ¶
func WithHTTPClient(cli *http.Client) ClientOption
WithHTTPClient functional option to set the http client
type GQLClient ¶
type GQLClient interface {
Query(ctx context.Context, q interface{}, variables map[string]interface{}) error
}
GQLClient is an interface for a graphql client
type GetLoadBalancer ¶
type GetLoadBalancer struct {
LoadBalancer LoadBalancer `graphql:"loadBalancer(id: $id)"`
}
type LoadBalancer ¶
type LocationNode ¶ added in v0.0.2
type LocationNode struct {
ID string
}
type OriginEdges ¶
type OriginEdges struct {
Node OriginNode
}
type OriginNode ¶
type Origins ¶
type Origins struct {
Edges []OriginEdges
}
Click to show internal directories.
Click to hide internal directories.