Documentation ¶
Index ¶
- Constants
- type ACL
- type ACLPolicies
- type ACLTokens
- func (t *ACLTokens) Create(token *structs.ACLToken) (*structs.ACLToken, error)
- func (t *ACLTokens) Delete(id string) error
- func (t *ACLTokens) Get(id string) (*structs.ACLToken, error)
- func (t *ACLTokens) List() ([]*structs.ACLTokenListStub, error)
- func (t *ACLTokens) Self() (*structs.ACLToken, error)
- func (t *ACLTokens) Update(token *structs.ACLToken) (*structs.ACLToken, error)
- type Agent
- type Client
- type CodedError
- type Config
- type Connections
- func (n *Connections) Create(connection *structs.Connection) error
- func (n *Connections) Delete(id string) error
- func (n *Connections) Get(id string) (*structs.Connection, error)
- func (n *Connections) List() ([]*structs.ConnectionListStub, error)
- func (n *Connections) Update(conn *structs.Connection) (*structs.Connection, error)
- type Interfaces
- func (n *Interfaces) Create(nodeID, networkID string) (*structs.Interface, error)
- func (n *Interfaces) Delete(id string) error
- func (n *Interfaces) Get(id string) (*structs.Interface, error)
- func (n *Interfaces) List(filters map[string][]string) ([]*structs.InterfaceListStub, error)
- func (n *Interfaces) Update(iface *structs.Interface) (*structs.Interface, error)
- type Networks
- type Nodes
Constants ¶
const ( // DefaultAddress is the default Drago server address. DefaultAddress = "http://127.0.0.1:8080" // DefaultTimeout is the default request timeout. DefaultTimeout = 2 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACL ¶
type ACL struct {
// contains filtered or unexported fields
}
ACL is a handle to the ACL API
type ACLPolicies ¶
type ACLPolicies struct {
// contains filtered or unexported fields
}
ACLPolicies is a handle to the ACL policies API
func (*ACLPolicies) List ¶
func (p *ACLPolicies) List() ([]*structs.ACLPolicyListStub, error)
List :
type ACLTokens ¶
type ACLTokens struct {
// contains filtered or unexported fields
}
ACLTokens is a handle to the ACL tokens API
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent is a handle to the agent API
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides a client to the Drago API
func (*Client) ACLPolicies ¶
func (c *Client) ACLPolicies() *ACLPolicies
ACLPolicies returns a handle on the ACL policies endpoints.
func (*Client) Connections ¶
func (c *Client) Connections() *Connections
Connections returns a handle on the connections endpoints.
func (*Client) Interfaces ¶
func (c *Client) Interfaces() *Interfaces
Interfaces returns a handle on the interfaces endpoints.
type CodedError ¶
func (CodedError) Error ¶
func (e CodedError) Error() string
type Config ¶
type Config struct { // URL of the Drago server (e.g. http://127.0.0.1:8080). Address string // Token to be used for authentication. Token string // Request timeout. Timeout time.Duration }
Config contains configurations for Drago's API client.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a default configuration for Drago's API client.
type Connections ¶
type Connections struct {
// contains filtered or unexported fields
}
Connections is a handle to the connection API
func (*Connections) Create ¶
func (n *Connections) Create(connection *structs.Connection) error
func (*Connections) Delete ¶
func (n *Connections) Delete(id string) error
func (*Connections) List ¶
func (n *Connections) List() ([]*structs.ConnectionListStub, error)
List :
func (*Connections) Update ¶
func (n *Connections) Update(conn *structs.Connection) (*structs.Connection, error)
type Interfaces ¶
type Interfaces struct {
// contains filtered or unexported fields
}
Interfaces is a handle to the interfaces API
func (*Interfaces) Create ¶
func (n *Interfaces) Create(nodeID, networkID string) (*structs.Interface, error)
Create :
func (*Interfaces) List ¶
func (n *Interfaces) List(filters map[string][]string) ([]*structs.InterfaceListStub, error)
List :
type Networks ¶
type Networks struct {
// contains filtered or unexported fields
}
Networks is a handle to the nodes API