Documentation ¶
Index ¶
- Constants
- Variables
- type Cache
- type CircuitError
- type CircuitFailureCause
- type Config
- type ForwardingFaultReport
- type InspectResult
- type InspectResultValue
- type InspectTarget
- type InspectionsManager
- type InvalidCircuitError
- type LinkValidationCallback
- type Network
- func (network *Network) AcceptMetricsMsg(metrics *metrics_pb.MetricsMessage)
- func (network *Network) AddCapability(capability string)
- func (network *Network) AddInspectTarget(target InspectTarget)
- func (network *Network) AddRouterPresenceHandler(h RouterPresenceHandler)
- func (network *Network) AllConnectedRouters() []*model.Router
- func (network *Network) CircuitEvent(eventType event.CircuitEventType, circuit *model.Circuit, ...)
- func (network *Network) CircuitFailedEvent(circuitId string, params model.CreateCircuitParams, startTime time.Time, ...)
- func (network *Network) ConnectRouter(r *model.Router)
- func (network *Network) ConnectedRouter(id string) bool
- func (network *Network) CreateCircuit(params model.CreateCircuitParams) (*model.Circuit, error)
- func (network *Network) CreatePath(srcR, dstR *model.Router) (*model.Path, error)
- func (network *Network) CreatePathWithNodes(nodes []*model.Router) (*model.Path, CircuitError)
- func (network *Network) CreateRouteMessages(path *model.Path, attempt uint32, circuitId string, terminator xt.Terminator, ...) []*ctrl_pb.Route
- func (network *Network) DisconnectRouter(r *model.Router)
- func (network *Network) GetAllCircuits() []*model.Circuit
- func (network *Network) GetAllLinks() []*model.Link
- func (network *Network) GetAllLinksForRouter(routerId string) []*model.Link
- func (network *Network) GetAppId() string
- func (network *Network) GetCapabilities() []string
- func (network *Network) GetCircuit(circuitId string) (*model.Circuit, bool)
- func (network *Network) GetCircuitStore() *objectz.ObjectStore[*model.Circuit]
- func (network *Network) GetCloseNotify() <-chan struct{}
- func (network *Network) GetConnectedRouter(routerId string) *model.Router
- func (network *Network) GetDb() boltz.Db
- func (network *Network) GetEventDispatcher() event.Dispatcher
- func (network *Network) GetLink(linkId string) (*model.Link, bool)
- func (network *Network) GetLinkStore() *objectz.ObjectStore[*model.Link]
- func (network *Network) GetMetricsRegistry() metrics.Registry
- func (network *Network) GetOptions() *config.NetworkConfig
- func (network *Network) GetReloadedRouter(routerId string) (*model.Router, error)
- func (network *Network) GetRouter(routerId string) (*model.Router, error)
- func (network *Network) GetServiceEventsMetricsRegistry() metrics.UsageRegistry
- func (network *Network) GetStores() *db.Stores
- func (network *Network) GetTraceController() trace.Controller
- func (self *Network) HandleRouterDelete(id string)
- func (network *Network) InitServiceCounterDispatch(handler metrics.Handler)
- func (network *Network) Inspect(name string) (*string, error)
- func (network *Network) LinkConnected(msg *ctrl_pb.LinkConnected) error
- func (network *Network) LinkFaulted(l *model.Link, dupe bool) error
- func (network *Network) NotifyExistingLink(id string, iteration uint32, linkProtocol, dialAddress string, ...)
- func (network *Network) NotifyLinkConnected(link *model.Link, msg *ctrl_pb.LinkConnected)
- func (network *Network) NotifyLinkEvent(link *model.Link, eventType event.LinkEventType)
- func (network *Network) NotifyLinkIdEvent(linkId string, eventType event.LinkEventType)
- func (network *Network) RemoveCircuit(circuitId string, now bool) error
- func (network *Network) RemoveLink(linkId string)
- func (network *Network) ReportForwardingFaults(ffr *ForwardingFaultReport)
- func (network *Network) RerouteLink(l *model.Link)
- func (network *Network) RestoreSnapshot(cmd *command.SyncSnapshotCommand) error
- func (network *Network) RouteResult(rs *RouteStatus) bool
- func (network *Network) Run()
- func (network *Network) ServiceDialFail(serviceId, terminatorId string)
- func (network *Network) ServiceDialOtherError(serviceId string)
- func (network *Network) ServiceDialSuccess(serviceId, terminatorId string)
- func (network *Network) ServiceDialTimeout(serviceId, terminatorId string)
- func (network *Network) ServiceInvalidTerminator(serviceId, terminatorId string)
- func (network *Network) ServiceMisconfiguredTerminator(serviceId, terminatorId string)
- func (network *Network) ServiceTerminatorConnectionRefused(serviceId, terminatorId string)
- func (network *Network) ServiceTerminatorTimeout(serviceId, terminatorId string)
- func (network *Network) SnapshotDatabase() error
- func (network *Network) SnapshotDatabaseToFile(path string) (string, error)
- func (network *Network) SnapshotToRaft() error
- func (network *Network) UpdatePath(path *model.Path) (*model.Path, error)
- func (n *Network) ValidateLinks(filter string, cb LinkValidationCallback) (int64, func(), error)
- func (network *Network) ValidateRouterLinks(router *model.Router, cb LinkValidationCallback)
- func (n *Network) ValidateRouterSdkTerminators(filter string, cb SdkTerminatorValidationCallback) (int64, func(), error)
- func (network *Network) ValidateTerminators(r *model.Router)
- func (network *Network) VerifyRouter(routerId string, fingerprints []string) error
- type PathAndCost
- type RouteStatus
- type RouterMessaging
- func (self *RouterMessaging) Inspect() (*inspect.RouterMessagingState, error)
- func (self *RouterMessaging) NewValidationResponseHandler(n *Network, r *model.Router) channel.ReceiveHandlerF
- func (self *RouterMessaging) RouterConnected(r *model.Router)
- func (self *RouterMessaging) RouterDeleted(routerId string)
- func (self *RouterMessaging) RouterDisconnected(r *model.Router)
- func (self *RouterMessaging) TerminatorCreated(terminator *db.Terminator)
- func (self *RouterMessaging) ValidateRouterTerminators(terminators []*model.Terminator)
- type RouterPresenceHandler
- type SdkTerminatorValidationCallback
- type ServiceCounters
Constants ¶
View Source
const SmartRerouteAttempt = 99969996
Variables ¶
View Source
var DbSnapshotTooFrequentError = dbSnapshotTooFrequentError{}
Functions ¶
This section is empty.
Types ¶
type CircuitError ¶
type CircuitError interface { error Cause() CircuitFailureCause }
type CircuitFailureCause ¶
type CircuitFailureCause string
const ( CircuitFailureInvalidService CircuitFailureCause = "INVALID_SERVICE" CircuitFailureIdGenerationError CircuitFailureCause = "ID_GENERATION_ERR" CircuitFailureNoTerminators CircuitFailureCause = "NO_TERMINATORS" CircuitFailureNoOnlineTerminators CircuitFailureCause = "NO_ONLINE_TERMINATORS" CircuitFailureNoPath CircuitFailureCause = "NO_PATH" CircuitFailurePathMissingLink CircuitFailureCause = "PATH_MISSING_LINK" CircuitFailureInvalidStrategy CircuitFailureCause = "INVALID_STRATEGY" CircuitFailureStrategyError CircuitFailureCause = "STRATEGY_ERR" CircuitFailureRouterResponseTimeout CircuitFailureCause = "ROUTER_RESPONSE_TIMEOUT" CircuitFailureRouterErrGeneric CircuitFailureCause = "ROUTER_ERR_GENERIC" CircuitFailureRouterErrInvalidTerminator CircuitFailureCause = "ROUTER_ERR_INVALID_TERMINATOR" CircuitFailureRouterErrMisconfiguredTerminator CircuitFailureCause = "ROUTER_ERR_MISCONFIGURED_TERMINATOR" CircuitFailureRouterErrDialTimedOut CircuitFailureCause = "ROUTER_ERR_DIAL_TIMED_OUT" CircuitFailureRouterErrDialConnRefused CircuitFailureCause = "ROUTER_ERR_CONN_REFUSED" )
type Config ¶
type Config interface { GetId() *identity.TokenId GetMetricsRegistry() metrics.Registry GetOptions() *config.NetworkConfig GetCommandDispatcher() command.Dispatcher GetDb() boltz.Db GetVersionProvider() versions.VersionProvider GetEventDispatcher() event.Dispatcher GetCloseNotify() <-chan struct{} }
Config provides the values needed to create a Network instance
type ForwardingFaultReport ¶
type InspectResult ¶
type InspectResult struct { Success bool Errors []string Results []*InspectResultValue }
type InspectResultValue ¶
type InspectionsManager ¶
type InspectionsManager struct {
// contains filtered or unexported fields
}
func NewInspectionsManager ¶
func NewInspectionsManager(network *Network) *InspectionsManager
func (*InspectionsManager) Inspect ¶
func (self *InspectionsManager) Inspect(appRegex string, values []string) *InspectResult
type InvalidCircuitError ¶
type InvalidCircuitError struct {
// contains filtered or unexported fields
}
func (InvalidCircuitError) Error ¶
func (err InvalidCircuitError) Error() string
type LinkValidationCallback ¶ added in v0.32.0
type LinkValidationCallback func(detail *mgmt_pb.RouterLinkDetails)
type Network ¶
type Network struct { *model.Managers VersionProvider versions.VersionProvider Inspections *InspectionsManager RouterMessaging *RouterMessaging // contains filtered or unexported fields }
func (*Network) AcceptMetricsMsg ¶
func (network *Network) AcceptMetricsMsg(metrics *metrics_pb.MetricsMessage)
func (*Network) AddCapability ¶
func (*Network) AddInspectTarget ¶ added in v1.1.1
func (network *Network) AddInspectTarget(target InspectTarget)
func (*Network) AddRouterPresenceHandler ¶
func (network *Network) AddRouterPresenceHandler(h RouterPresenceHandler)
func (*Network) AllConnectedRouters ¶
func (*Network) CircuitEvent ¶
func (*Network) CircuitFailedEvent ¶
func (network *Network) CircuitFailedEvent( circuitId string, params model.CreateCircuitParams, startTime time.Time, path *model.Path, t xt.CostedTerminator, cause CircuitFailureCause)
func (*Network) ConnectRouter ¶
func (*Network) ConnectedRouter ¶
func (*Network) CreateCircuit ¶
func (*Network) CreatePath ¶
func (*Network) CreatePathWithNodes ¶
func (*Network) CreateRouteMessages ¶ added in v1.1.6
func (*Network) DisconnectRouter ¶
func (*Network) GetAllCircuits ¶
func (*Network) GetAllLinks ¶
func (*Network) GetAllLinksForRouter ¶
func (*Network) GetCapabilities ¶
func (*Network) GetCircuit ¶
func (*Network) GetCircuitStore ¶ added in v0.31.1
func (network *Network) GetCircuitStore() *objectz.ObjectStore[*model.Circuit]
func (*Network) GetCloseNotify ¶
func (network *Network) GetCloseNotify() <-chan struct{}
func (*Network) GetConnectedRouter ¶
func (*Network) GetEventDispatcher ¶
func (network *Network) GetEventDispatcher() event.Dispatcher
func (*Network) GetLinkStore ¶ added in v0.31.1
func (network *Network) GetLinkStore() *objectz.ObjectStore[*model.Link]
func (*Network) GetMetricsRegistry ¶
func (*Network) GetOptions ¶
func (network *Network) GetOptions() *config.NetworkConfig
func (*Network) GetReloadedRouter ¶
func (*Network) GetServiceEventsMetricsRegistry ¶
func (network *Network) GetServiceEventsMetricsRegistry() metrics.UsageRegistry
func (*Network) GetTraceController ¶
func (network *Network) GetTraceController() trace.Controller
func (*Network) HandleRouterDelete ¶ added in v1.1.6
func (*Network) InitServiceCounterDispatch ¶
func (*Network) LinkConnected ¶
func (network *Network) LinkConnected(msg *ctrl_pb.LinkConnected) error
func (*Network) NotifyExistingLink ¶
func (*Network) NotifyLinkConnected ¶
func (network *Network) NotifyLinkConnected(link *model.Link, msg *ctrl_pb.LinkConnected)
func (*Network) NotifyLinkEvent ¶
func (network *Network) NotifyLinkEvent(link *model.Link, eventType event.LinkEventType)
func (*Network) NotifyLinkIdEvent ¶
func (network *Network) NotifyLinkIdEvent(linkId string, eventType event.LinkEventType)
func (*Network) RemoveCircuit ¶
func (*Network) RemoveLink ¶
func (*Network) ReportForwardingFaults ¶
func (network *Network) ReportForwardingFaults(ffr *ForwardingFaultReport)
func (*Network) RerouteLink ¶ added in v0.34.3
func (*Network) RestoreSnapshot ¶
func (network *Network) RestoreSnapshot(cmd *command.SyncSnapshotCommand) error
func (*Network) RouteResult ¶
func (network *Network) RouteResult(rs *RouteStatus) bool
func (*Network) ServiceDialFail ¶
func (*Network) ServiceDialOtherError ¶
func (*Network) ServiceDialSuccess ¶
func (*Network) ServiceDialTimeout ¶
func (*Network) ServiceInvalidTerminator ¶
func (*Network) ServiceMisconfiguredTerminator ¶
func (*Network) ServiceTerminatorConnectionRefused ¶
func (*Network) ServiceTerminatorTimeout ¶
func (*Network) SnapshotDatabase ¶
func (*Network) SnapshotDatabaseToFile ¶
func (*Network) SnapshotToRaft ¶
func (*Network) UpdatePath ¶
func (*Network) ValidateLinks ¶ added in v0.32.0
func (n *Network) ValidateLinks(filter string, cb LinkValidationCallback) (int64, func(), error)
func (*Network) ValidateRouterLinks ¶ added in v1.1.6
func (network *Network) ValidateRouterLinks(router *model.Router, cb LinkValidationCallback)
func (*Network) ValidateRouterSdkTerminators ¶ added in v0.33.0
func (n *Network) ValidateRouterSdkTerminators(filter string, cb SdkTerminatorValidationCallback) (int64, func(), error)
func (*Network) ValidateTerminators ¶
type PathAndCost ¶
type PathAndCost struct {
// contains filtered or unexported fields
}
type RouteStatus ¶
type RouterMessaging ¶
type RouterMessaging struct {
// contains filtered or unexported fields
}
func NewRouterMessaging ¶
func NewRouterMessaging(env model.Env, routerCommPool goroutines.Pool) *RouterMessaging
func (*RouterMessaging) Inspect ¶ added in v0.33.0
func (self *RouterMessaging) Inspect() (*inspect.RouterMessagingState, error)
func (*RouterMessaging) NewValidationResponseHandler ¶ added in v0.33.0
func (self *RouterMessaging) NewValidationResponseHandler(n *Network, r *model.Router) channel.ReceiveHandlerF
func (*RouterMessaging) RouterConnected ¶
func (self *RouterMessaging) RouterConnected(r *model.Router)
func (*RouterMessaging) RouterDeleted ¶
func (self *RouterMessaging) RouterDeleted(routerId string)
func (*RouterMessaging) RouterDisconnected ¶
func (self *RouterMessaging) RouterDisconnected(r *model.Router)
func (*RouterMessaging) TerminatorCreated ¶ added in v0.33.0
func (self *RouterMessaging) TerminatorCreated(terminator *db.Terminator)
func (*RouterMessaging) ValidateRouterTerminators ¶ added in v0.33.0
func (self *RouterMessaging) ValidateRouterTerminators(terminators []*model.Terminator)
type RouterPresenceHandler ¶
type SdkTerminatorValidationCallback ¶ added in v0.33.0
type SdkTerminatorValidationCallback func(detail *mgmt_pb.RouterSdkTerminatorsDetails)
type ServiceCounters ¶
type ServiceCounters interface { ServiceDialSuccess(serviceId, terminatorId string) ServiceDialFail(serviceId, terminatorId string) ServiceDialTimeout(serviceId, terminatorId string) ServiceDialOtherError(serviceId string) ServiceTerminatorTimeout(serviceId, terminatorId string) ServiceTerminatorConnectionRefused(serviceId, terminatorId string) ServiceInvalidTerminator(serviceId, terminatorId string) ServiceMisconfiguredTerminator(serviceId, terminatorId string) }
Click to show internal directories.
Click to hide internal directories.