wrapper

package
v0.0.0-...-d4ca6f9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ValueType_name = map[int32]string{
		0: "UNKNOWN_VALUE_TYPE",
		1: "STRING",
		2: "STRING_ARRAY",
		3: "UINT32",
		4: "UINT64",
		5: "INT32",
		6: "INT64",
		7: "SOCKADDR",
	}
	ValueType_value = map[string]int32{
		"UNKNOWN_VALUE_TYPE": 0,
		"STRING":             1,
		"STRING_ARRAY":       2,
		"UINT32":             3,
		"UINT64":             4,
		"INT32":              5,
		"INT64":              6,
		"SOCKADDR":           7,
	}
)

Enum value maps for ValueType.

View Source
var (
	SaFamilyT_name = map[int32]string{
		0:  "SA_FAMILY_T_UNSPEC",
		1:  "AF_UNIX",
		2:  "AF_INET",
		10: "AF_INET6",
	}
	SaFamilyT_value = map[string]int32{
		"SA_FAMILY_T_UNSPEC": 0,
		"AF_UNIX":            1,
		"AF_INET":            2,
		"AF_INET6":           10,
	}
)

Enum value maps for SaFamilyT.

View Source
var File_event_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Argument

type Argument struct {

	// name is the name of this argument.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// valueType the type of the value held by this argument.
	ValueType ValueType `protobuf:"varint,2,opt,name=valueType,proto3,enum=wrapper.ValueType" json:"valueType,omitempty"`
	// value the value held by this argument.
	Value *Value `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Argument represents an argument associated with the given Event.

func (*Argument) Descriptor deprecated

func (*Argument) Descriptor() ([]byte, []int)

Deprecated: Use Argument.ProtoReflect.Descriptor instead.

func (*Argument) GetName

func (x *Argument) GetName() string

func (*Argument) GetValue

func (x *Argument) GetValue() *Value

func (*Argument) GetValueType

func (x *Argument) GetValueType() ValueType

func (*Argument) ProtoMessage

func (*Argument) ProtoMessage()

func (*Argument) ProtoReflect

func (x *Argument) ProtoReflect() protoreflect.Message

func (*Argument) Reset

func (x *Argument) Reset()

func (*Argument) String

func (x *Argument) String() string

type Container

type Container struct {
	Id            string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	ImageName     string `protobuf:"bytes,2,opt,name=imageName,proto3" json:"imageName,omitempty"`
	ImageDigest   string `protobuf:"bytes,3,opt,name=imageDigest,proto3" json:"imageDigest,omitempty"`
	ContainerName string `protobuf:"bytes,4,opt,name=containerName,proto3" json:"containerName,omitempty"`
	// contains filtered or unexported fields
}

func (*Container) Descriptor deprecated

func (*Container) Descriptor() ([]byte, []int)

Deprecated: Use Container.ProtoReflect.Descriptor instead.

func (*Container) GetContainerName

func (x *Container) GetContainerName() string

func (*Container) GetId

func (x *Container) GetId() string

func (*Container) GetImageDigest

func (x *Container) GetImageDigest() string

func (*Container) GetImageName

func (x *Container) GetImageName() string

func (*Container) ProtoMessage

func (*Container) ProtoMessage()

func (*Container) ProtoReflect

func (x *Container) ProtoReflect() protoreflect.Message

func (*Container) Reset

func (x *Container) Reset()

func (*Container) String

func (x *Container) String() string

type Event

type Event struct {
	Timestamp           *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	ProcessorID         int64                `protobuf:"varint,2,opt,name=processorID,proto3" json:"processorID,omitempty"`
	ProcessID           int64                `protobuf:"varint,3,opt,name=processID,proto3" json:"processID,omitempty"`
	CgroupID            uint64               `protobuf:"varint,4,opt,name=cgroupID,proto3" json:"cgroupID,omitempty"`
	ThreadID            int64                `protobuf:"varint,5,opt,name=threadID,proto3" json:"threadID,omitempty"`
	ParentProcessID     int64                `protobuf:"varint,6,opt,name=parentProcessID,proto3" json:"parentProcessID,omitempty"`
	HostProcessID       int64                `protobuf:"varint,7,opt,name=hostProcessID,proto3" json:"hostProcessID,omitempty"`
	HostThreadID        int64                `protobuf:"varint,8,opt,name=hostThreadID,proto3" json:"hostThreadID,omitempty"`
	HostParentProcessID int64                `protobuf:"varint,9,opt,name=hostParentProcessID,proto3" json:"hostParentProcessID,omitempty"`
	UserID              int64                `protobuf:"varint,10,opt,name=userID,proto3" json:"userID,omitempty"`
	MountNS             int64                `protobuf:"varint,11,opt,name=mountNS,proto3" json:"mountNS,omitempty"`
	PIDNS               int64                `protobuf:"varint,12,opt,name=PIDNS,proto3" json:"PIDNS,omitempty"`
	ProcessName         string               `protobuf:"bytes,13,opt,name=processName,proto3" json:"processName,omitempty"`
	HostName            string               `protobuf:"bytes,14,opt,name=hostName,proto3" json:"hostName,omitempty"`
	Container           *Container           `protobuf:"bytes,15,opt,name=container,proto3" json:"container,omitempty"`
	Kubernetes          *Kubernetes          `protobuf:"bytes,16,opt,name=kubernetes,proto3" json:"kubernetes,omitempty"`
	EventID             int64                `protobuf:"varint,17,opt,name=eventID,proto3" json:"eventID,omitempty"`
	EventName           string               `protobuf:"bytes,18,opt,name=eventName,proto3" json:"eventName,omitempty"`
	ArgsNum             int64                `protobuf:"varint,19,opt,name=argsNum,proto3" json:"argsNum,omitempty"`
	ReturnValue         int64                `protobuf:"varint,20,opt,name=returnValue,proto3" json:"returnValue,omitempty"`
	StackAddresses      []uint64             `protobuf:"varint,21,rep,packed,name=stackAddresses,proto3" json:"stackAddresses,omitempty"`
	Args                []*Argument          `protobuf:"bytes,22,rep,name=args,proto3" json:"args,omitempty"`
	// contains filtered or unexported fields
}

func Wrap

func Wrap(envelope protocol.Event) (*Event, error)

Wrap the specified protocol.Event as Event so we can use cel-go without implementing custom ref.TypeProvider.

func (*Event) Descriptor deprecated

func (*Event) Descriptor() ([]byte, []int)

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetArgs

func (x *Event) GetArgs() []*Argument

func (*Event) GetArgsNum

func (x *Event) GetArgsNum() int64

func (*Event) GetCgroupID

func (x *Event) GetCgroupID() uint64

func (*Event) GetContainer

func (x *Event) GetContainer() *Container

func (*Event) GetEventID

func (x *Event) GetEventID() int64

func (*Event) GetEventName

func (x *Event) GetEventName() string

func (*Event) GetHostName

func (x *Event) GetHostName() string

func (*Event) GetHostParentProcessID

func (x *Event) GetHostParentProcessID() int64

func (*Event) GetHostProcessID

func (x *Event) GetHostProcessID() int64

func (*Event) GetHostThreadID

func (x *Event) GetHostThreadID() int64

func (*Event) GetKubernetes

func (x *Event) GetKubernetes() *Kubernetes

func (*Event) GetMountNS

func (x *Event) GetMountNS() int64

func (*Event) GetPIDNS

func (x *Event) GetPIDNS() int64

func (*Event) GetParentProcessID

func (x *Event) GetParentProcessID() int64

func (*Event) GetProcessID

func (x *Event) GetProcessID() int64

func (*Event) GetProcessName

func (x *Event) GetProcessName() string

func (*Event) GetProcessorID

func (x *Event) GetProcessorID() int64

func (*Event) GetReturnValue

func (x *Event) GetReturnValue() int64

func (*Event) GetStackAddresses

func (x *Event) GetStackAddresses() []uint64

func (*Event) GetThreadID

func (x *Event) GetThreadID() int64

func (*Event) GetTimestamp

func (x *Event) GetTimestamp() *timestamp.Timestamp

func (*Event) GetUserID

func (x *Event) GetUserID() int64

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

func (x *Event) ProtoReflect() protoreflect.Message

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type Kubernetes

type Kubernetes struct {
	PodName      string `protobuf:"bytes,1,opt,name=podName,proto3" json:"podName,omitempty"`
	PodNamespace string `protobuf:"bytes,2,opt,name=podNamespace,proto3" json:"podNamespace,omitempty"`
	PodUID       string `protobuf:"bytes,3,opt,name=podUID,proto3" json:"podUID,omitempty"`
	PodSandbox   bool   `protobuf:"varint,4,opt,name=podSandbox,proto3" json:"podSandbox,omitempty"`
	// contains filtered or unexported fields
}

func (*Kubernetes) Descriptor deprecated

func (*Kubernetes) Descriptor() ([]byte, []int)

Deprecated: Use Kubernetes.ProtoReflect.Descriptor instead.

func (*Kubernetes) GetPodName

func (x *Kubernetes) GetPodName() string

func (*Kubernetes) GetPodNamespace

func (x *Kubernetes) GetPodNamespace() string

func (*Kubernetes) GetPodSandbox

func (x *Kubernetes) GetPodSandbox() bool

func (*Kubernetes) GetPodUID

func (x *Kubernetes) GetPodUID() string

func (*Kubernetes) ProtoMessage

func (*Kubernetes) ProtoMessage()

func (*Kubernetes) ProtoReflect

func (x *Kubernetes) ProtoReflect() protoreflect.Message

func (*Kubernetes) Reset

func (x *Kubernetes) Reset()

func (*Kubernetes) String

func (x *Kubernetes) String() string

type SaFamilyT

type SaFamilyT int32
const (
	SaFamilyT_SA_FAMILY_T_UNSPEC SaFamilyT = 0
	// POSIX.1g used the name AF_LOCAL as a synonym for AF_UNIX,
	// but this name is not used in SUSv3.
	SaFamilyT_AF_UNIX  SaFamilyT = 1
	SaFamilyT_AF_INET  SaFamilyT = 2
	SaFamilyT_AF_INET6 SaFamilyT = 10
)

func (SaFamilyT) Descriptor

func (SaFamilyT) Descriptor() protoreflect.EnumDescriptor

func (SaFamilyT) Enum

func (x SaFamilyT) Enum() *SaFamilyT

func (SaFamilyT) EnumDescriptor deprecated

func (SaFamilyT) EnumDescriptor() ([]byte, []int)

Deprecated: Use SaFamilyT.Descriptor instead.

func (SaFamilyT) Number

func (x SaFamilyT) Number() protoreflect.EnumNumber

func (SaFamilyT) String

func (x SaFamilyT) String() string

func (SaFamilyT) Type

type Sockaddr

type Sockaddr struct {
	SaFamily     SaFamilyT `protobuf:"varint,1,opt,name=sa_family,json=saFamily,proto3,enum=wrapper.SaFamilyT" json:"sa_family,omitempty"`
	SunPath      string    `protobuf:"bytes,2,opt,name=sun_path,json=sunPath,proto3" json:"sun_path,omitempty"`
	SinAddr      string    `protobuf:"bytes,3,opt,name=sin_addr,json=sinAddr,proto3" json:"sin_addr,omitempty"`
	SinPort      uint32    `protobuf:"varint,4,opt,name=sin_port,json=sinPort,proto3" json:"sin_port,omitempty"`
	Sin6Addr     string    `protobuf:"bytes,5,opt,name=sin6_addr,json=sin6Addr,proto3" json:"sin6_addr,omitempty"`
	Sin6Port     uint32    `protobuf:"varint,6,opt,name=sin6_port,json=sin6Port,proto3" json:"sin6_port,omitempty"`
	Sin6Flowinfo uint32    `protobuf:"varint,7,opt,name=sin6_flowinfo,json=sin6Flowinfo,proto3" json:"sin6_flowinfo,omitempty"`
	Sin6Scopeid  uint32    `protobuf:"varint,8,opt,name=sin6_scopeid,json=sin6Scopeid,proto3" json:"sin6_scopeid,omitempty"`
	// contains filtered or unexported fields
}

func (*Sockaddr) Descriptor deprecated

func (*Sockaddr) Descriptor() ([]byte, []int)

Deprecated: Use Sockaddr.ProtoReflect.Descriptor instead.

func (*Sockaddr) GetSaFamily

func (x *Sockaddr) GetSaFamily() SaFamilyT

func (*Sockaddr) GetSin6Addr

func (x *Sockaddr) GetSin6Addr() string

func (*Sockaddr) GetSin6Flowinfo

func (x *Sockaddr) GetSin6Flowinfo() uint32

func (*Sockaddr) GetSin6Port

func (x *Sockaddr) GetSin6Port() uint32

func (*Sockaddr) GetSin6Scopeid

func (x *Sockaddr) GetSin6Scopeid() uint32

func (*Sockaddr) GetSinAddr

func (x *Sockaddr) GetSinAddr() string

func (*Sockaddr) GetSinPort

func (x *Sockaddr) GetSinPort() uint32

func (*Sockaddr) GetSunPath

func (x *Sockaddr) GetSunPath() string

func (*Sockaddr) ProtoMessage

func (*Sockaddr) ProtoMessage()

func (*Sockaddr) ProtoReflect

func (x *Sockaddr) ProtoReflect() protoreflect.Message

func (*Sockaddr) Reset

func (x *Sockaddr) Reset()

func (*Sockaddr) String

func (x *Sockaddr) String() string

type Value

type Value struct {
	StringValue      *string   `protobuf:"bytes,1,opt,name=stringValue,proto3,oneof" json:"stringValue,omitempty"`
	StringArrayValue []string  `protobuf:"bytes,2,rep,name=stringArrayValue,proto3" json:"stringArrayValue,omitempty"`
	Uint32Value      *uint32   `protobuf:"varint,3,opt,name=uint32Value,proto3,oneof" json:"uint32Value,omitempty"`
	Uint64Value      *uint64   `protobuf:"varint,4,opt,name=uint64Value,proto3,oneof" json:"uint64Value,omitempty"`
	Int32Value       *int32    `protobuf:"varint,5,opt,name=int32Value,proto3,oneof" json:"int32Value,omitempty"`
	Int64Value       *int64    `protobuf:"varint,6,opt,name=int64Value,proto3,oneof" json:"int64Value,omitempty"`
	SockaddrValue    *Sockaddr `protobuf:"bytes,7,opt,name=sockaddrValue,proto3,oneof" json:"sockaddrValue,omitempty"`
	// contains filtered or unexported fields
}

Value is a union-like structure that wraps the value of a given Argument. We are not using Oneof nor Any type because of their limitations. The Oneof type does not allow repeated values, whereas Any is not convenient to unpack structured values.

A similar approach is taken by Kubernetes APIs. For example, PersistentVolumeSource holds mutually exclusive volume definitions. See https://github.com/kubernetes/api/blob/master/core/v1/generated.proto

func (*Value) Descriptor deprecated

func (*Value) Descriptor() ([]byte, []int)

Deprecated: Use Value.ProtoReflect.Descriptor instead.

func (*Value) GetInt32Value

func (x *Value) GetInt32Value() int32

func (*Value) GetInt64Value

func (x *Value) GetInt64Value() int64

func (*Value) GetSockaddrValue

func (x *Value) GetSockaddrValue() *Sockaddr

func (*Value) GetStringArrayValue

func (x *Value) GetStringArrayValue() []string

func (*Value) GetStringValue

func (x *Value) GetStringValue() string

func (*Value) GetUint32Value

func (x *Value) GetUint32Value() uint32

func (*Value) GetUint64Value

func (x *Value) GetUint64Value() uint64

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) ProtoReflect

func (x *Value) ProtoReflect() protoreflect.Message

func (*Value) Reset

func (x *Value) Reset()

func (*Value) String

func (x *Value) String() string

type ValueType

type ValueType int32

ValueType enumerates types of Argument values.

const (
	ValueType_UNKNOWN_VALUE_TYPE ValueType = 0
	ValueType_STRING             ValueType = 1
	ValueType_STRING_ARRAY       ValueType = 2
	ValueType_UINT32             ValueType = 3
	ValueType_UINT64             ValueType = 4
	ValueType_INT32              ValueType = 5
	ValueType_INT64              ValueType = 6
	// SOCKADDR is just an example of a complex type wrapped from trace.Event to
	// Protocol Buffer message to demonstrate CEL capabilities with more complex
	// expressions.
	ValueType_SOCKADDR ValueType = 7
)

func (ValueType) Descriptor

func (ValueType) Descriptor() protoreflect.EnumDescriptor

func (ValueType) Enum

func (x ValueType) Enum() *ValueType

func (ValueType) EnumDescriptor deprecated

func (ValueType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ValueType.Descriptor instead.

func (ValueType) Number

func (x ValueType) Number() protoreflect.EnumNumber

func (ValueType) String

func (x ValueType) String() string

func (ValueType) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL