import "github.com/cilium/cilium/pkg/client"
client.go config.go endpoint.go identity.go ipam.go lrp.go policy.go prefilter.go service.go
const ( AddressFamilyIPv6 = "ipv6" AddressFamilyIPv4 = "ipv4" )
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, } )
DefaultSockPath returns default UNIX domain socket path or path set using CILIUM_SOCK env variable
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(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 ..."
Hint tries to improve the error message displayed to the user.
NewClient creates a client for the given `host`. If host is nil then use SockPath provided by CILIUM_SOCK or the cilium default SockPath
NewDefaultClient creates a client with default parameters connecting to UNIX domain socket.
NewDefaultClientWithTimeout creates a client with default parameters connecting to UNIX domain socket and waits for cilium-agent availability.
func (c *Client) ConfigGet() (*models.DaemonConfiguration, error)
ConfigGet returns a daemon configuration.
func (c *Client) ConfigPatch(cfg models.DaemonConfigurationSpec) error
ConfigPatch modifies the daemon configuration.
DeletePrefilter deletes a list of CIDR prefixes
DeleteServiceID deletes a service by ID.
EndpointConfigGet returns endpoint configuration
EndpointConfigPatch modifies endpoint configuration
func (c *Client) EndpointCreate(ep *models.EndpointChangeRequest) error
EndpointCreate creates a new endpoint
EndpointDelete deletes endpoint
EndpointGet returns endpoint by ID
EndpointHealthGet returns endpoint healthz
EndpointLabelsGet returns endpoint label configuration
EndpointLabelsPut modifies endpoint label configuration add: List of labels to add and enable. If the label is an orchestration system label which has been disabled before, it will be removed from the disabled list and readded to the orchestration list. Otherwise it will be added to the custom label list.
delete: List of labels to delete. If the label is an orchestration system label, then it will be deleted from the orchestration list and added to the disabled list. Otherwise it will be removed from the custom list.
EndpointList returns a list of all endpoints
EndpointLogGet returns endpoint log
EndpointPatch modifies the endpoint
GetLRPs returns a list of all local redirect policies.
GetPrefilter returns a list of all CIDR prefixes
GetServiceID returns a service by ID.
GetServices returns a list of all services.
IPAMAllocate allocates an IP address out of address family specific pool.
IPAMAllocateIP tries to allocate a particular IP address.
IPAMReleaseIP releases a IP address back to the pool.
IdentityGet returns a security identity.
PatchPrefilter sets a list of CIDR prefixes
func (c *Client) PolicyCacheGet() (models.SelectorCache, error)
PolicyCacheGet returns the contents of a SelectorCache.
PolicyDelete deletes policy rules
PolicyGet returns policy rules
PolicyPut inserts the `policyJSON`
func (c *Client) PolicyResolveGet(traceSelector *models.TraceSelector) (*models.PolicyTraceResult, error)
PolicyResolveGet resolves policy for a Trace Selector with source and destination identity.
PutServiceID creates or updates a service. Returns true if service was created.
type StatusDetails struct { // AllAddress causes all addresses to be printed by FormatStatusResponse. AllAddresses bool // AllControllers causes all controllers to be printed by FormatStatusResponse. AllControllers bool // AllNodes causes all nodes to be printed by FormatStatusResponse. AllNodes bool // AllRedirects causes all redirects to be printed by FormatStatusResponse. AllRedirects bool // AllClusters causes all clusters to be printed by FormatStatusResponse. AllClusters bool // BPFMapDetails causes BPF map details to be printed by FormatStatusResponse. BPFMapDetails bool // KubeProxyReplacementDetails causes BPF kube-proxy details to be printed by FormatStatusResponse. KubeProxyReplacementDetails bool // ClockSourceDetails causes BPF time-keeping internals to be printed by FormatStatusResponse. ClockSourceDetails bool }
Package client imports 26 packages (graph) and is imported by 56 packages. Updated 2021-01-18. Refresh now. Tools for package owners.