damianoneill / net Goto Github PK
View Code? Open in Web Editor NEWManagement Protocol Network implementations in Go; NETCONF, SNMP, CLI
License: MIT License
Management Protocol Network implementations in Go; NETCONF, SNMP, CLI
License: MIT License
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?
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.