Giter VIP home page Giter VIP logo

net's Introduction

Management Network Library

GitHub release Go Report Card license Go Docs

Management Protocol Network implementations in Go

This package includes:

  • Client side support of the NETCONF Protocol defined in (rfc6241).
  • Client side support for NETCONF Notifications defined in (rc5277).
  • GetSchemas and GetSchema from NETCONF Monitoring defined in (rfc6022).
  • Client side support of the SNMP Protocol defined in (rfc3416).

The library includes support for the following cross-cutting concerns through dependency injection:

  • Logging
  • Metrics
  • Configuration

The transport layer is externalized from the Library using dependency injection, allowing the user to choose and configure as their specific environment requires. Go Examples are included for demonstration purposes.

The package can be downloaded with the following command, note the v2 in the module path.

go get -u github.com/damianoneill/net/v2/...

Credits

The implementation of the framing codec in the rfc6242 package has been adapted from an implementation by Andrew Fort - https://github.com/andaru/netconf.

The implementation of the ber encoding has been leveraged from the implementation by Geoff Garside - https://github.com/geoffgarside/ber.

net's People

Contributors

alrighttheresham avatar damianoneill avatar dependabot-preview[bot] avatar dependabot[bot] avatar sjames-iberis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

net's Issues

Generic Session Drop Awareness

Is it possible to be notified of the session ending?
Perhaps due to a general connectivity issue.

For example, I open sessions with the Server and listen for notifications.
If the session drops, how can I become aware of it?

SNMP SessionTrace has non-exported dependencies, thus I can't supply my own logging hooks

I want to do this ...

factory.NewSession(
 ctx, 
 address,
 snmp.Community(host.User), 
 snmp.LoggingHooks(MyLoggingHooks))

but quoting https://github.com/damianoneill/net/blob/master/v2/snmp/trace.go :

// SessionTrace defines a structure for handling trace events
type SessionTrace struct {
	// ConnectStart is called before establishing a network connection to an agent.
	ConnectStart func(config *sessionConfig)
	// ConnectDone is called when the network connection attempt completes, with err indicating
	// whether it was successful.
	ConnectDone func(config *sessionConfig, err error)

etc etc

A work around is to use one of the supplied ones i.e. DiagnosticLoggingHooks, DefaultLoggingHooks or NoOpLoggingHooks (though as I want simply timings, the DiagnosticLoggingHooks one very verbose)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.