-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrouterboard.go
38 lines (27 loc) · 934 Bytes
/
routerboard.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package mikrotik
import (
"time"
// Include package reference so that go get will pulldependencies
_ "github.com/alouca/gosnmp"
)
type Routerboarder interface {
Routerboard() Routerboard
}
type Routerboard interface {
Routerboarder
// Does initial setup in order to communicate to RB
Initialize()
// Removes any cached information
FlushCaches()
// Returns a time.Duration representing how long the RB has been running
GetSystemUptime() (uptime time.Duration, err error)
// Retuns the system description, i.e. RouterOS RB450G
GetSystemDescription() (sysDesc string, err error)
// Retuns the system name
GetSystemName() (sysDesc string, err error)
// Retuns a string comprised of the system name, description, and uptime
GetSystemBanner() (banner string, err error)
// Interface Methods
GetInterfaces() (ifaces []RbInterface, err error)
FindInterfaceByName(ifName string) (iface RbInterface, err error)
}