Documentation ¶
Index ¶
- Constants
- Variables
- func ClearMockSpeakerStore()
- type Mock
- func (s *Mock) AddPath(ctx context.Context, path PathInfo) error
- func (s *Mock) AddPeer(ctx context.Context, peer PeerInfo) error
- func (s *Mock) DeletePath(ctx context.Context, path PathInfo) error
- func (s *Mock) DeletePeer(ctx context.Context, peer string) error
- func (s *Mock) GetInfo(ctx context.Context) (*SpeakerInfo, error)
- func (s *Mock) GetPeer(ctx context.Context, peer string) (*PeerInfo, error)
- func (s *Mock) HealthCheck(ctx context.Context) error
- func (s *Mock) SetInfo(ctx context.Context, info SpeakerInfo) error
- type PathInfo
- type PeerInfo
- type PeerState
- type Speaker
- type SpeakerInfo
- type SpeakerType
Constants ¶
View Source
const (
SartDefaultEndpointPort uint32 = 5000
)
Variables ¶
Functions ¶
func ClearMockSpeakerStore ¶
func ClearMockSpeakerStore()
Types ¶
type PathInfo ¶
func GetMockSpeakerPath ¶
type PeerInfo ¶
type PeerInfo struct { LocalAsn uint32 LocalRouterId string PeerAsn uint32 PeerRouterId string Protocol string State PeerState Uptime time.Time }
func GetMockSpeakerPeer ¶
type Speaker ¶
type Speaker interface { HealthCheck(context.Context) error GetInfo(context.Context) (*SpeakerInfo, error) SetInfo(context.Context, SpeakerInfo) error GetPeer(context.Context, string) (*PeerInfo, error) AddPeer(context.Context, PeerInfo) error DeletePeer(context.Context, string) error AddPath(context.Context, PathInfo) error DeletePath(context.Context, PathInfo) error }
type SpeakerInfo ¶
type SpeakerType ¶
type SpeakerType string
var ( SpeakerTypeUnknown SpeakerType = SpeakerType("unknown") SpeakerTypeSart SpeakerType = SpeakerType("sart") SpeakerTypeMock SpeakerType = SpeakerType("mock") )
func ParseSpeakerType ¶
func ParseSpeakerType(t string) (SpeakerType, error)
Click to show internal directories.
Click to hide internal directories.