Documentation ¶
Overview ¶
Package api provides the Cilium useful helpers for the external API
Index ¶
Constants ¶
View Source
const ( // GroupFilePath is the unix group file path. GroupFilePath = "/etc/group" // CiliumGroupName is the cilium's unix group name. CiliumGroupName = "cilium" // SocketFileMode is the default file mode for the sockets. SocketFileMode os.FileMode = 0660 //ClientTimeout specifies timeout to be used by clients ClientTimeout = 90 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func GetGroupIDByName ¶
GetGroupIDByName returns the group ID for the given grpName.
func SetDefaultPermissions ¶
SetDefaultPermissions sets the given socket to with cilium's default group and mode permissions. Group `CiliumGroupName` and mode `0660`
Types ¶
type APIError ¶
type APIError struct {
// contains filtered or unexported fields
}
APIError is the error representation for the API.
func (*APIError) WriteResponse ¶
func (a *APIError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client.
type APIPanicHandler ¶
APIPanicHandler recovers from API panics and logs encountered panics
func (*APIPanicHandler) ServeHTTP ¶
func (h *APIPanicHandler) ServeHTTP(wr http.ResponseWriter, req *http.Request)
ServeHTTP implements the http.Handler interface. It recovers from panics of all next handlers and logs them
Click to show internal directories.
Click to hide internal directories.