ioam_api

package module
v0.0.0-...-40611d4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

README

IOAM API with Protocol Buffers v3

Go Package for IOAM API with Protocol Buffers v3, see ioam_api.proto. It is based on RFC 9197.

This API is available for any agent/collector requirements and is currently used by:

Generate Go code from the protobuf definition

protoc \
    --go_out=paths=source_relative:. \
    --go-grpc_out=paths=source_relative:. \
    ioam_api.proto

Right now, only the IOAM (Pre-allocated) Trace Option-Type is supported.

Cross-Layer Telemetry

The clt folder contains specific version to work with the Cross-Layer Telemetry (CLT) project.

Documentation

Index

Constants

View Source
const (
	IOAMService_Report_FullMethodName = "/ioam_api.IOAMService/Report"
)

Variables

View Source
var File_ioam_api_proto protoreflect.FileDescriptor
View Source
var IOAMService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ioam_api.IOAMService",
	HandlerType: (*IOAMServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Report",
			Handler:       _IOAMService_Report_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "ioam_api.proto",
}

IOAMService_ServiceDesc is the grpc.ServiceDesc for IOAMService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterIOAMServiceServer

func RegisterIOAMServiceServer(s grpc.ServiceRegistrar, srv IOAMServiceServer)

Types

type IOAMNode

type IOAMNode struct {
	HopLimit          uint32  `protobuf:"varint,1,opt,name=HopLimit,proto3" json:"HopLimit,omitempty"`
	Id                uint32  `protobuf:"varint,2,opt,name=Id,proto3" json:"Id,omitempty"`
	IngressId         uint32  `protobuf:"varint,3,opt,name=IngressId,proto3" json:"IngressId,omitempty"`
	EgressId          uint32  `protobuf:"varint,4,opt,name=EgressId,proto3" json:"EgressId,omitempty"`
	TimestampSecs     uint32  `protobuf:"varint,5,opt,name=TimestampSecs,proto3" json:"TimestampSecs,omitempty"`
	TimestampFrac     uint32  `protobuf:"varint,6,opt,name=TimestampFrac,proto3" json:"TimestampFrac,omitempty"`
	TransitDelay      uint32  `protobuf:"varint,7,opt,name=TransitDelay,proto3" json:"TransitDelay,omitempty"`
	QueueDepth        uint32  `protobuf:"varint,8,opt,name=QueueDepth,proto3" json:"QueueDepth,omitempty"`
	CsumComp          uint32  `protobuf:"varint,9,opt,name=CsumComp,proto3" json:"CsumComp,omitempty"`
	BufferOccupancy   uint32  `protobuf:"varint,10,opt,name=BufferOccupancy,proto3" json:"BufferOccupancy,omitempty"`
	IngressIdWide     uint32  `protobuf:"varint,11,opt,name=IngressIdWide,proto3" json:"IngressIdWide,omitempty"`
	EgressIdWide      uint32  `protobuf:"varint,12,opt,name=EgressIdWide,proto3" json:"EgressIdWide,omitempty"`
	IdWide            uint64  `protobuf:"varint,13,opt,name=IdWide,proto3" json:"IdWide,omitempty"`
	NamespaceData     []byte  `protobuf:"bytes,14,opt,name=NamespaceData,proto3" json:"NamespaceData,omitempty"`         // 4-octet field
	NamespaceDataWide []byte  `protobuf:"bytes,15,opt,name=NamespaceDataWide,proto3" json:"NamespaceDataWide,omitempty"` // 8-octet field
	OSS               *Opaque `protobuf:"bytes,16,opt,name=OSS,proto3" json:"OSS,omitempty"`
	// contains filtered or unexported fields
}

IOAM Node Data

func (*IOAMNode) Descriptor deprecated

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

Deprecated: Use IOAMNode.ProtoReflect.Descriptor instead.

func (*IOAMNode) GetBufferOccupancy

func (x *IOAMNode) GetBufferOccupancy() uint32

func (*IOAMNode) GetCsumComp

func (x *IOAMNode) GetCsumComp() uint32

func (*IOAMNode) GetEgressId

func (x *IOAMNode) GetEgressId() uint32

func (*IOAMNode) GetEgressIdWide

func (x *IOAMNode) GetEgressIdWide() uint32

func (*IOAMNode) GetHopLimit

func (x *IOAMNode) GetHopLimit() uint32

func (*IOAMNode) GetId

func (x *IOAMNode) GetId() uint32

func (*IOAMNode) GetIdWide

func (x *IOAMNode) GetIdWide() uint64

func (*IOAMNode) GetIngressId

func (x *IOAMNode) GetIngressId() uint32

func (*IOAMNode) GetIngressIdWide

func (x *IOAMNode) GetIngressIdWide() uint32

func (*IOAMNode) GetNamespaceData

func (x *IOAMNode) GetNamespaceData() []byte

func (*IOAMNode) GetNamespaceDataWide

func (x *IOAMNode) GetNamespaceDataWide() []byte

func (*IOAMNode) GetOSS

func (x *IOAMNode) GetOSS() *Opaque

func (*IOAMNode) GetQueueDepth

func (x *IOAMNode) GetQueueDepth() uint32

func (*IOAMNode) GetTimestampFrac

func (x *IOAMNode) GetTimestampFrac() uint32

func (*IOAMNode) GetTimestampSecs

func (x *IOAMNode) GetTimestampSecs() uint32

func (*IOAMNode) GetTransitDelay

func (x *IOAMNode) GetTransitDelay() uint32

func (*IOAMNode) ProtoMessage

func (*IOAMNode) ProtoMessage()

func (*IOAMNode) ProtoReflect

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

func (*IOAMNode) Reset

func (x *IOAMNode) Reset()

func (*IOAMNode) String

func (x *IOAMNode) String() string

type IOAMServiceClient

type IOAMServiceClient interface {
	// Report an IOAM Trace
	Report(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[IOAMTrace, emptypb.Empty], error)
}

IOAMServiceClient is the client API for IOAMService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

IOAM Service

type IOAMServiceServer

type IOAMServiceServer interface {
	// Report an IOAM Trace
	Report(grpc.ClientStreamingServer[IOAMTrace, emptypb.Empty]) error
	// contains filtered or unexported methods
}

IOAMServiceServer is the server API for IOAMService service. All implementations must embed UnimplementedIOAMServiceServer for forward compatibility.

IOAM Service

type IOAMService_ReportClient

type IOAMService_ReportClient = grpc.ClientStreamingClient[IOAMTrace, emptypb.Empty]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type IOAMService_ReportServer

type IOAMService_ReportServer = grpc.ClientStreamingServer[IOAMTrace, emptypb.Empty]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type IOAMTrace

type IOAMTrace struct {
	NamespaceId uint32      `protobuf:"varint,1,opt,name=NamespaceId,proto3" json:"NamespaceId,omitempty"`
	BitField    uint32      `protobuf:"fixed32,2,opt,name=BitField,proto3" json:"BitField,omitempty"`
	Nodes       []*IOAMNode `protobuf:"bytes,3,rep,name=Nodes,proto3" json:"Nodes,omitempty"`
	// contains filtered or unexported fields
}

IOAM Trace

func (*IOAMTrace) Descriptor deprecated

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

Deprecated: Use IOAMTrace.ProtoReflect.Descriptor instead.

func (*IOAMTrace) GetBitField

func (x *IOAMTrace) GetBitField() uint32

func (*IOAMTrace) GetNamespaceId

func (x *IOAMTrace) GetNamespaceId() uint32

func (*IOAMTrace) GetNodes

func (x *IOAMTrace) GetNodes() []*IOAMNode

func (*IOAMTrace) ProtoMessage

func (*IOAMTrace) ProtoMessage()

func (*IOAMTrace) ProtoReflect

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

func (*IOAMTrace) Reset

func (x *IOAMTrace) Reset()

func (*IOAMTrace) String

func (x *IOAMTrace) String() string

type Opaque

type Opaque struct {
	SchemaId uint32 `protobuf:"varint,1,opt,name=SchemaId,proto3" json:"SchemaId,omitempty"`
	Data     []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` // variable length field
	// contains filtered or unexported fields
}

Opaque State Snapshot

func (*Opaque) Descriptor deprecated

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

Deprecated: Use Opaque.ProtoReflect.Descriptor instead.

func (*Opaque) GetData

func (x *Opaque) GetData() []byte

func (*Opaque) GetSchemaId

func (x *Opaque) GetSchemaId() uint32

func (*Opaque) ProtoMessage

func (*Opaque) ProtoMessage()

func (*Opaque) ProtoReflect

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

func (*Opaque) Reset

func (x *Opaque) Reset()

func (*Opaque) String

func (x *Opaque) String() string

type UnimplementedIOAMServiceServer

type UnimplementedIOAMServiceServer struct{}

UnimplementedIOAMServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedIOAMServiceServer) Report

type UnsafeIOAMServiceServer

type UnsafeIOAMServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeIOAMServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to IOAMServiceServer will result in compilation errors.

Directories

Path Synopsis
clt module

Jump to

Keyboard shortcuts

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