Documentation
¶
Index ¶
- Variables
- func DefaultSockPath() string
- func FormatStatusResponse(w io.Writer, sr *models.StatusResponse, sd StatusDetails)
- func FormatStatusResponseBrief(w io.Writer, sr *models.StatusResponse)
- func Hint(err error) error
- func NewRuntime(opts ...func(options *runtimeOptions)) (*runtime_client.Runtime, error)
- func WithBasePath(basePath string) func(options *runtimeOptions)
- func WithHost(host string) func(options *runtimeOptions)
- type Client
- type StatusDetails
Constants ¶
This section is empty.
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 ¶
func DefaultSockPath() string
DefaultSockPath returns default UNIX domain socket path or path set using CILIUM_SOCK env variable
func FormatStatusResponse ¶
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 ¶
FormatStatusResponseBrief writes a one-line status to the writer. If everything ok, this is "ok", otherwise a message of the form "error in ..."
func NewRuntime ¶
func NewRuntime(opts ...func(options *runtimeOptions)) (*runtime_client.Runtime, error)
func WithBasePath ¶
func WithBasePath(basePath string) func(options *runtimeOptions)
Types ¶
type Client ¶
type Client struct {
clientapi.CiliumAPI
}
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.
type StatusDetails ¶
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 }