Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultSockPath() string
- func FormatStatusResponse(w io.Writer, sr *models.StatusResponse, sd StatusDetails)
- func FormatStatusResponseBrief(w io.Writer, sr *models.StatusResponse)
- func FormatStatusResponseRemoteClusters(w io.Writer, clusters []*models.RemoteCluster, ...)
- func Hint(err error) error
- func NewRuntime(opts ...func(options *runtimeOptions)) (*runtime_client.Runtime, error)
- func NewTransport(host string) (*http.Transport, error)
- func NumReadyClusters(clusters []*models.RemoteCluster) int
- func WithBasePath(basePath string) func(options *runtimeOptions)
- func WithHost(host string) func(options *runtimeOptions)
- type Client
- func (c *Client) ConfigGet() (*models.DaemonConfiguration, error)
- func (c *Client) ConfigPatch(cfg models.DaemonConfigurationSpec) error
- func (c *Client) DeletePrefilter(spec *models.PrefilterSpec) (*models.Prefilter, error)
- func (c *Client) DeleteRecorderID(id int64) error
- func (c *Client) EndpointConfigGet(id string) (*models.EndpointConfigurationStatus, error)
- func (c *Client) EndpointConfigPatch(id string, cfg *models.EndpointConfigurationSpec) error
- func (c *Client) EndpointCreate(ep *models.EndpointChangeRequest) (*models.Endpoint, error)
- func (c *Client) EndpointDelete(id string) error
- func (c *Client) EndpointDeleteMany(req *models.EndpointBatchDeleteRequest) error
- func (c *Client) EndpointGet(id string) (*models.Endpoint, error)
- func (c *Client) EndpointHealthGet(id string) (*models.EndpointHealth, error)
- func (c *Client) EndpointLabelsGet(id string) (*models.LabelConfiguration, error)
- func (c *Client) EndpointLabelsPatch(id string, toAdd, toDelete models.Labels) error
- func (c *Client) EndpointList() ([]*models.Endpoint, error)
- func (c *Client) EndpointLogGet(id string) (models.EndpointStatusLog, error)
- func (c *Client) EndpointPatch(id string, ep *models.EndpointChangeRequest) error
- func (c *Client) GetLRPs() ([]*models.LRPSpec, error)
- func (c *Client) GetPrefilter() (*models.Prefilter, error)
- func (c *Client) GetRecorder() ([]*models.Recorder, error)
- func (c *Client) GetRecorderID(id int64) (*models.Recorder, error)
- func (c *Client) GetRecorderMasks() ([]*models.RecorderMask, error)
- func (c *Client) GetServices() ([]*models.Service, error)
- func (c *Client) IPAMAllocate(family, owner, pool string, expiration bool) (*models.IPAMResponse, error)
- func (c *Client) IPAMAllocateIP(ip, owner, pool string) error
- func (c *Client) IPAMReleaseIP(ip, pool string) error
- func (c *Client) IdentityGet(id string) (*models.Identity, error)
- func (c *Client) PatchPrefilter(spec *models.PrefilterSpec) (*models.Prefilter, error)
- func (c *Client) PolicyCacheGet() (models.SelectorCache, error)
- func (c *Client) PolicyDelete(labels []string) (*models.Policy, error)
- func (c *Client) PolicyGet(labels []string) (*models.Policy, error)
- func (c *Client) PolicyPut(policyJSON string) (*models.Policy, error)
- func (c *Client) PolicyReplace(policyJSON string, replace bool, replaceWithLabels []string) (*models.Policy, error)
- func (c *Client) PutRecorderID(id int64, rec *models.RecorderSpec) (bool, error)
- type RemoteClustersStatusVerbosity
- type StatusDetails
Constants ¶
const ( AddressFamilyIPv6 = "ipv6" AddressFamilyIPv4 = "ipv4" )
Variables ¶
var ( // StatusAllDetails causes no additional status details to be printed by // FormatStatusResponse. StatusNoDetails = StatusDetails{} // StatusAllDetails causes all status details to be printed by FormatStatusResponse. StatusAllDetails = StatusDetails{ AllAddresses: true, AllControllers: true, AllNodes: true, AllRedirects: true, AllClusters: true, BPFMapDetails: true, KubeProxyReplacementDetails: true, ClockSourceDetails: true, } )
Functions ¶
func DefaultSockPath ¶ added in v0.15.7
func DefaultSockPath() string
DefaultSockPath returns default UNIX domain socket path or path set using CILIUM_SOCK env variable
func FormatStatusResponse ¶ added in v0.15.7
func FormatStatusResponse(w io.Writer, sr *models.StatusResponse, sd StatusDetails)
FormatStatusResponse writes a StatusResponse as a string to the writer. The bit mask sd controls whether a additional details are printed about a certain aspect of the status. In case there are errors, some details may be printed regardless of the value of sd.
func FormatStatusResponseBrief ¶ added in v0.15.7
func FormatStatusResponseBrief(w io.Writer, sr *models.StatusResponse)
FormatStatusResponseBrief writes a one-line status to the writer. If everything ok, this is "ok", otherwise a message of the form "error in ..."
func FormatStatusResponseRemoteClusters ¶ added in v1.15.6
func FormatStatusResponseRemoteClusters(w io.Writer, clusters []*models.RemoteCluster, verbosity RemoteClustersStatusVerbosity)
func NewRuntime ¶ added in v0.15.7
func NewRuntime(opts ...func(options *runtimeOptions)) (*runtime_client.Runtime, error)
func NumReadyClusters ¶ added in v1.15.6
func NumReadyClusters(clusters []*models.RemoteCluster) int
func WithBasePath ¶ added in v1.15.0
func WithBasePath(basePath string) func(options *runtimeOptions)
Types ¶
type Client ¶
func NewClient ¶
NewClient creates a client for the given `host`. If host is nil then use SockPath provided by CILIUM_SOCK or the cilium default SockPath
func NewDefaultClient ¶
NewDefaultClient creates a client with default parameters connecting to UNIX domain socket.
func NewDefaultClientWithTimeout ¶ added in v0.15.7
NewDefaultClientWithTimeout creates a client with default parameters connecting to UNIX domain socket and waits for cilium-agent availability.
func (*Client) ConfigGet ¶
func (c *Client) ConfigGet() (*models.DaemonConfiguration, error)
ConfigGet returns a daemon configuration.