Documentation ¶
Index ¶
- func ToGoSnmpPDU(pbSnmpPdu *pb.SnmpPDU) (pdu gosnmp.SnmpPDU)
- func ToPbSnmpPDU(pdu gosnmp.SnmpPDU) (pbSnmpPdu *pb.SnmpPDU)
- type CommandServer
- func (s *CommandServer) Get(ctx context.Context, oids *pb.OidList) (snmpPacket *pb.SnmpPacket, err error)
- func (s *CommandServer) Set(ctx context.Context, pdus *pb.SnmpPDUs) (snmpPacket *pb.SnmpPacket, err error)
- func (s *CommandServer) StreamWalk(oid *pb.Oid, srv pb.Command_StreamWalkServer) error
- func (s *CommandServer) Walk(ctx context.Context, oid *pb.Oid) (snmpPacket *pb.SnmpPDUs, err error)
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToGoSnmpPDU ¶
ToGoSnmpPDU helper converts protobuf snmppdu to go snmpPDU
Types ¶
type CommandServer ¶
type CommandServer struct { ListenAddr string DefaultVersion gosnmp.SnmpVersion DefaultCommunity string Logger Logger SNMPLogger gosnmp.Logger }
CommandServer is the GRPC Service for snmp.Command
func (*CommandServer) Get ¶
func (s *CommandServer) Get(ctx context.Context, oids *pb.OidList) (snmpPacket *pb.SnmpPacket, err error)
Get implements snmpget command
func (*CommandServer) Set ¶
func (s *CommandServer) Set(ctx context.Context, pdus *pb.SnmpPDUs) (snmpPacket *pb.SnmpPacket, err error)
Set implements snmpset command
func (*CommandServer) StreamWalk ¶
func (s *CommandServer) StreamWalk(oid *pb.Oid, srv pb.Command_StreamWalkServer) error
StreamWalk implements snmpwalk command in a stream
Click to show internal directories.
Click to hide internal directories.