Documentation ¶
Index ¶
- Variables
- func AddRoute(neighborNetwork *net.IPNet, nextHop net.IP, iface netlink.Link) error
- func AnnounceEndpoint(networkCidr *net.IPNet, hostIface, gitRepoURL string)
- func CopyFile(dstName, srcName string) (written int64, err error)
- func CreatePaths(path string) error
- func DeleteDir(path string) error
- func DiffDirectories(previousRecords, latestRecords string) (removed, added []string, err error)
- func DirectoryList(basedir string) ([]string, error)
- func FileModifiedCompare(slice1 []string, slice2 []string) []string
- func MakeAbs(fpath string) string
- func RecursiveDirectoryList(basedir string) ([]string, error)
- func Run(gitURL, masterIface string, timeInterval int, daemon bool)
- type ControlConfig
- type GitCmd
- type LocalEndpoint
- type Node
- type NodeEvent
- type NodeState
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BaseDirectory = "data" // configurable base directory where records are cached GitDatastoreURL = "" MasterEthIface = "" DefaultInterval = 20 // time in seconds DefaultIntervalMin = 10 // time in seconds EndpointBase = BaseDirectory + "/endpoints" // .old and .new are appended to this EndpointPushRoot = BaseDirectory + "/config" // new endpoints push their conf from here EndpointPushSubDir = BaseDirectory + "/config/endpoints" // new endpoint sources here DefaultBackupPath = BaseDirectory + "/snapshots" // backup path for configs EndpointStoreLatestRoot = EndpointBase + ".latest" // latest pull from the git repository EndpointStoreOldRoot = EndpointBase + ".old" // latest pull from the git repository EndpointStoreLatest = EndpointStoreLatestRoot + "/endpoints" EndpointStoreOld = EndpointStoreOldRoot + "/endpoints" )
Exported default configurations values
Functions ¶
func AnnounceEndpoint ¶
AnnounceEndpoint takes libnetwork endpoint data writes it to a json file and pushes it to a Git repo for distribution
func CreatePaths ¶
func DiffDirectories ¶
func DirectoryList ¶
func FileModifiedCompare ¶
func RecursiveDirectoryList ¶
Types ¶
type ControlConfig ¶
type ControlConfig struct { Repo string // URL for git repo. TimeInterval int // time between checking repo for endpoint updates BaseDir string // base cache directory MasterIface string // master netlink iface "ethX" }
Useful or not, on the fence
func (*ControlConfig) GetBasePath ¶
func (g *ControlConfig) GetBasePath() string
func (*ControlConfig) GetTimeInterval ¶
func (g *ControlConfig) GetTimeInterval() int
func (*ControlConfig) Process ¶
func (g *ControlConfig) Process()
func (*ControlConfig) String ¶
func (g *ControlConfig) String() string
type LocalEndpoint ¶
Click to show internal directories.
Click to hide internal directories.