client

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(conf Config) (api.RulesService, error)

New constructs a new A8 controller client.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements the Amalgam8 Controller API

func NewClient added in v1.0.0

func NewClient(conf Config) (*Client, error)

NewClient constructs a new A8 API controller client. It returns the Client structure

func (*Client) CreateRules added in v1.0.0

func (c *Client) CreateRules(rulesSet *api.RulesSet) (*api.RulesIDList, error)

CreateRules creates the rules

func (*Client) Debug added in v1.0.0

func (c *Client) Debug(debug bool)

Debug is used to set the debugging flag.

func (*Client) DeleteRules added in v1.0.0

func (c *Client) DeleteRules(filter *api.RuleFilter) error

DeleteRules deletes the rules

func (*Client) ListAction added in v1.0.0

func (c *Client) ListAction(filter *api.RuleFilter) (*api.RulesByService, error)

ListAction retuns the list of action rules

func (*Client) ListRoutes added in v1.0.0

func (c *Client) ListRoutes(filter *api.RuleFilter) (*api.RulesByService, error)

ListRoutes return sthe list of route rules

func (*Client) ListRules added in v1.0.0

func (c *Client) ListRules(filter *api.RuleFilter) (*api.RulesSet, error)

ListRules returns the list of rules

func (*Client) UpdateRules added in v1.0.0

func (c *Client) UpdateRules(rulesSet *api.RulesSet) (*api.RulesIDList, error)

UpdateRules updates the rules

type Config

type Config struct {

	// URL of the controller server.
	URL string

	// AuthToken is the token to be used for authentication with the controller.
	// If left empty, no authentication is used.
	AuthToken string

	// HTTPClient can be used to customize the underlying HTTP client behavior,
	// such as enabling TLS, setting timeouts, etc.
	// If left nil, a default HTTP client will be used.
	HTTPClient *http.Client
}

Config stores the configurable attributes of the client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL