client

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AddressFamilyIPv6 = "ipv6"
	AddressFamilyIPv4 = "ipv4"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	clientapi.Cilium
}

func NewClient

func NewClient(host string) (*Client, error)

NewClient creates a client for the given `host`.

func NewDefaultClient

func NewDefaultClient() (*Client, error)

NewDefaultClient creates a client with default parameters connecting to UNIX domain socket.

func (*Client) ConfigGet

func (c *Client) ConfigGet() (*models.DaemonConfigurationResponse, error)

ConfigGet returns a daemon configuration.

func (*Client) ConfigPatch

func (c *Client) ConfigPatch(cfg models.ConfigurationMap) error

ConfigPatch modifies the daemon configuration.

func (*Client) DeleteServiceID

func (c *Client) DeleteServiceID(id int64) error

DeleteServiceID deletes a service by ID.

func (*Client) EndpointConfigGet

func (c *Client) EndpointConfigGet(id string) (*models.Configuration, error)

EndpointConfigGet returns endpoint configuration

func (*Client) EndpointConfigPatch

func (c *Client) EndpointConfigPatch(id string, cfg models.ConfigurationMap) error

EndpointConfigPatch modifies endpoint configuration

func (*Client) EndpointCreate

func (c *Client) EndpointCreate(ep *models.EndpointChangeRequest) error

EndpointCreate creates a new endpoint

func (*Client) EndpointDelete

func (c *Client) EndpointDelete(id string) error

EndpointDelete deletes endpoint

func (*Client) EndpointGet

func (c *Client) EndpointGet(id string) (*models.Endpoint, error)

EndpointGet returns endpoint by ID

func (*Client) EndpointLabelsGet

func (c *Client) EndpointLabelsGet(id string) (*models.LabelConfiguration, error)

EndpointLabelsGet returns endpoint label configuration

func (*Client) EndpointLabelsPut

func (c *Client) EndpointLabelsPut(id string, cfg *models.LabelConfigurationModifier) error

EndpointLabelsPut modifies endpoint label configuration

func (*Client) EndpointList

func (c *Client) EndpointList() ([]*models.Endpoint, error)

EndpointList returns list of endpoints

func (*Client) EndpointPatch

func (c *Client) EndpointPatch(id string, ep *models.EndpointChangeRequest) error

EndpointPatch modifies the endpoint

func (*Client) GetServiceID

func (c *Client) GetServiceID(id int64) (*models.Service, error)

GetServiceID returns a service by ID.

func (*Client) GetServices

func (c *Client) GetServices() ([]*models.Service, error)

GetServices returns a list of all services.

func (*Client) IPAMAllocate

func (c *Client) IPAMAllocate(family string) (*models.IPAM, error)

IPAMAllocate allocates an IP address out of address family specific pool.

func (*Client) IPAMAllocateIP

func (c *Client) IPAMAllocateIP(ip string) error

IPAMAllocateIP tries to allocate a particular IP address.

func (*Client) IPAMReleaseIP

func (c *Client) IPAMReleaseIP(ip string) error

IPAMReleaseIP releases a IP address back to the pool.

func (*Client) IdentityGet

func (c *Client) IdentityGet(id string) (*models.Identity, error)

IdentityGet returns a security identity.

func (*Client) PolicyDelete

func (c *Client) PolicyDelete(path string) error

PolicyDelete returns a node in the policy tree.

func (*Client) PolicyGet

func (c *Client) PolicyGet(path string) (string, error)

PolicyGet returns a policy tree or subtree.

func (*Client) PolicyPut

func (c *Client) PolicyPut(path string, policyJSON string) (string, error)

PolicyPut inserts the `policyJSON` into the given `path`.

func (*Client) PolicyResolveGet

func (c *Client) PolicyResolveGet(context *models.IdentityContext) (*models.PolicyTraceResult, error)

PolicyResolveGet resolves policy for a context with source and destination identity.

func (*Client) PutServiceID

func (c *Client) PutServiceID(id int64, svc *models.Service) (bool, error)

PutServiceID creates or updates a service. Returns true if service was created.

Jump to

Keyboard shortcuts

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