inventoryv1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InventoryAggregator_SubmitInventory_FullMethodName = "/inventory.v1.InventoryAggregator/SubmitInventory"
)

Variables

View Source
var File_api_inventory_v1_inventory_proto protoreflect.FileDescriptor
View Source
var InventoryAggregator_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "inventory.v1.InventoryAggregator",
	HandlerType: (*InventoryAggregatorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SubmitInventory",
			Handler:    _InventoryAggregator_SubmitInventory_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/inventory/v1/inventory.proto",
}

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

Functions

func RegisterInventoryAggregatorServer

func RegisterInventoryAggregatorServer(s grpc.ServiceRegistrar, srv InventoryAggregatorServer)

Types

type DeviceRecord

type DeviceRecord struct {
	DeviceType     string `protobuf:"bytes,1,opt,name=device_type,json=deviceType,proto3" json:"device_type,omitempty"`
	DeviceName     string `protobuf:"bytes,2,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"`
	HostIdentifier string `protobuf:"bytes,3,opt,name=host_identifier,json=hostIdentifier,proto3" json:"host_identifier,omitempty"`
	SerialNumber   string `protobuf:"bytes,4,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"`
	// JSON-encoded device attributes.
	Attributes []byte `protobuf:"bytes,5,opt,name=attributes,proto3" json:"attributes,omitempty"`
	// contains filtered or unexported fields
}

DeviceRecord represents a single hardware inventory item.

func (*DeviceRecord) Descriptor deprecated

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

Deprecated: Use DeviceRecord.ProtoReflect.Descriptor instead.

func (*DeviceRecord) GetAttributes

func (x *DeviceRecord) GetAttributes() []byte

func (*DeviceRecord) GetDeviceName

func (x *DeviceRecord) GetDeviceName() string

func (*DeviceRecord) GetDeviceType

func (x *DeviceRecord) GetDeviceType() string

func (*DeviceRecord) GetHostIdentifier

func (x *DeviceRecord) GetHostIdentifier() string

func (*DeviceRecord) GetSerialNumber

func (x *DeviceRecord) GetSerialNumber() string

func (*DeviceRecord) ProtoMessage

func (*DeviceRecord) ProtoMessage()

func (*DeviceRecord) ProtoReflect

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

func (*DeviceRecord) Reset

func (x *DeviceRecord) Reset()

func (*DeviceRecord) String

func (x *DeviceRecord) String() string

type InventoryAggregatorClient

type InventoryAggregatorClient interface {
	// SubmitInventory receives a batch of device and neighbor records and
	// persists them to the database.
	SubmitInventory(ctx context.Context, in *SubmitInventoryRequest, opts ...grpc.CallOption) (*SubmitInventoryResponse, error)
}

InventoryAggregatorClient is the client API for InventoryAggregator 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.

InventoryAggregator accepts inventory data from nodes.

type InventoryAggregatorServer

type InventoryAggregatorServer interface {
	// SubmitInventory receives a batch of device and neighbor records and
	// persists them to the database.
	SubmitInventory(context.Context, *SubmitInventoryRequest) (*SubmitInventoryResponse, error)
	// contains filtered or unexported methods
}

InventoryAggregatorServer is the server API for InventoryAggregator service. All implementations must embed UnimplementedInventoryAggregatorServer for forward compatibility.

InventoryAggregator accepts inventory data from nodes.

type NeighborRecord

type NeighborRecord struct {
	HostIdentifier string `protobuf:"bytes,1,opt,name=host_identifier,json=hostIdentifier,proto3" json:"host_identifier,omitempty"`
	LocalInterface string `protobuf:"bytes,2,opt,name=local_interface,json=localInterface,proto3" json:"local_interface,omitempty"`
	// JSON-encoded neighbor attributes.
	Attributes []byte `protobuf:"bytes,3,opt,name=attributes,proto3" json:"attributes,omitempty"`
	// contains filtered or unexported fields
}

NeighborRecord represents a discovered network neighbor.

func (*NeighborRecord) Descriptor deprecated

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

Deprecated: Use NeighborRecord.ProtoReflect.Descriptor instead.

func (*NeighborRecord) GetAttributes

func (x *NeighborRecord) GetAttributes() []byte

func (*NeighborRecord) GetHostIdentifier

func (x *NeighborRecord) GetHostIdentifier() string

func (*NeighborRecord) GetLocalInterface

func (x *NeighborRecord) GetLocalInterface() string

func (*NeighborRecord) ProtoMessage

func (*NeighborRecord) ProtoMessage()

func (*NeighborRecord) ProtoReflect

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

func (*NeighborRecord) Reset

func (x *NeighborRecord) Reset()

func (*NeighborRecord) String

func (x *NeighborRecord) String() string

type SubmitInventoryRequest

type SubmitInventoryRequest struct {
	Devices   []*DeviceRecord   `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"`
	Neighbors []*NeighborRecord `protobuf:"bytes,2,rep,name=neighbors,proto3" json:"neighbors,omitempty"`
	// contains filtered or unexported fields
}

SubmitInventoryRequest carries a batch of inventory records from a node.

func (*SubmitInventoryRequest) Descriptor deprecated

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

Deprecated: Use SubmitInventoryRequest.ProtoReflect.Descriptor instead.

func (*SubmitInventoryRequest) GetDevices

func (x *SubmitInventoryRequest) GetDevices() []*DeviceRecord

func (*SubmitInventoryRequest) GetNeighbors

func (x *SubmitInventoryRequest) GetNeighbors() []*NeighborRecord

func (*SubmitInventoryRequest) ProtoMessage

func (*SubmitInventoryRequest) ProtoMessage()

func (*SubmitInventoryRequest) ProtoReflect

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

func (*SubmitInventoryRequest) Reset

func (x *SubmitInventoryRequest) Reset()

func (*SubmitInventoryRequest) String

func (x *SubmitInventoryRequest) String() string

type SubmitInventoryResponse

type SubmitInventoryResponse struct {
	DevicesSaved   int32 `protobuf:"varint,1,opt,name=devices_saved,json=devicesSaved,proto3" json:"devices_saved,omitempty"`
	NeighborsSaved int32 `protobuf:"varint,2,opt,name=neighbors_saved,json=neighborsSaved,proto3" json:"neighbors_saved,omitempty"`
	// contains filtered or unexported fields
}

SubmitInventoryResponse is returned after records have been persisted.

func (*SubmitInventoryResponse) Descriptor deprecated

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

Deprecated: Use SubmitInventoryResponse.ProtoReflect.Descriptor instead.

func (*SubmitInventoryResponse) GetDevicesSaved

func (x *SubmitInventoryResponse) GetDevicesSaved() int32

func (*SubmitInventoryResponse) GetNeighborsSaved

func (x *SubmitInventoryResponse) GetNeighborsSaved() int32

func (*SubmitInventoryResponse) ProtoMessage

func (*SubmitInventoryResponse) ProtoMessage()

func (*SubmitInventoryResponse) ProtoReflect

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

func (*SubmitInventoryResponse) Reset

func (x *SubmitInventoryResponse) Reset()

func (*SubmitInventoryResponse) String

func (x *SubmitInventoryResponse) String() string

type UnimplementedInventoryAggregatorServer

type UnimplementedInventoryAggregatorServer struct{}

UnimplementedInventoryAggregatorServer 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 (UnimplementedInventoryAggregatorServer) SubmitInventory

type UnsafeInventoryAggregatorServer

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

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

Jump to

Keyboard shortcuts

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