Documentation ¶
Index ¶
- Constants
- Variables
- func DropReason(reason uint8) string
- func EndpointRegenRepr(e notifications.RegenNotificationInfo, err error) (string, error)
- func PolicyDeleteRepr(deleted int, labels []string, revision uint64) (string, error)
- func PolicyUpdateRepr(numRules int, labels []string, revision uint64) (string, error)
- func TimeRepr(t time.Time) (string, error)
- type AgentNotification
- type AgentNotify
- type EndpointRegenNotification
- type MessageTypeFilter
- type PolicyUpdateNotification
- type TimeNotification
Constants ¶
View Source
const ( // 0-128 are reserved for BPF datapath events MessageTypeUnspec = iota MessageTypeDrop MessageTypeDebug MessageTypeCapture MessageTypeTrace // MessageTypeAccessLog contains a pkg/proxy/accesslog.LogRecord MessageTypeAccessLog = 129 // MessageTypeAgent is an agent notification carrying a AgentNotify MessageTypeAgent = 130 )
Must be synchronized with <bpf/lib/common.h>
Variables ¶
View Source
var ( // MessageTypeNames is a map of all type names MessageTypeNames = map[string]int{ "drop": MessageTypeDrop, "debug": MessageTypeDebug, "capture": MessageTypeCapture, "trace": MessageTypeTrace, "l7": MessageTypeAccessLog, "agent": MessageTypeAgent, } )
Functions ¶
func DropReason ¶
DropReason prints the drop reason in a human readable string
func EndpointRegenRepr ¶ added in v1.5.0
func EndpointRegenRepr(e notifications.RegenNotificationInfo, err error) (string, error)
EndpointRegenRepr returns string representation of monitor notification
func PolicyDeleteRepr ¶ added in v1.5.0
PolicyDeleteRepr returns string representation of monitor notification
func PolicyUpdateRepr ¶ added in v1.5.0
PolicyUpdateRepr returns string representation of monitor notification
Types ¶
type AgentNotification ¶
type AgentNotification uint32
AgentNotification specifies the type of agent notification
const ( AgentNotifyUnspec AgentNotification = iota AgentNotifyGeneric AgentNotifyStart AgentNotifyEndpointRegenerateSuccess AgentNotifyEndpointRegenerateFail AgentNotifyPolicyUpdated AgentNotifyPolicyDeleted )
type AgentNotify ¶
type AgentNotify struct { Type AgentNotification Text string }
AgentNotify is a notification from the agent
func (*AgentNotify) DumpInfo ¶
func (n *AgentNotify) DumpInfo()
DumpInfo dumps an agent notification
func (*AgentNotify) DumpJSON ¶
func (n *AgentNotify) DumpJSON()
DumpJSON prints notification in json format
type EndpointRegenNotification ¶
type EndpointRegenNotification struct { ID uint64 `json:"id,omitempty"` Labels []string `json:"labels,omitempty"` Error string `json:"error,omitempty"` }
EndpointRegenNotification structures regeneration notification
type MessageTypeFilter ¶
type MessageTypeFilter []int
func (*MessageTypeFilter) Contains ¶
func (m *MessageTypeFilter) Contains(typ int) bool
func (*MessageTypeFilter) Set ¶
func (m *MessageTypeFilter) Set(value string) error
func (*MessageTypeFilter) String ¶
func (m *MessageTypeFilter) String() string
func (*MessageTypeFilter) Type ¶
func (m *MessageTypeFilter) Type() string
type PolicyUpdateNotification ¶
type PolicyUpdateNotification struct { Labels []string `json:"labels,omitempty"` Revision uint64 `json:"revision,omitempty"` RuleCount int `json:"rule_count"` }
PolicyUpdateNotification structures update notification
type TimeNotification ¶
type TimeNotification struct {
Time string `json:"time"`
}
TimeNotification structures agent start notification
Click to show internal directories.
Click to hide internal directories.