Documentation
¶
Index ¶
- func NewRPCRequest(r io.Reader) *rpcRequest
- func StartJSONRPCServer(a *Agent)
- type Agent
- func (a *Agent) CreatePR(args *Args, commitBranch *string) (err error)
- func (a *Agent) GetRef(commitBranch *string) (err error)
- func (a *Agent) GetTree() (err error)
- func (a *Agent) GitClient()
- func (a *Agent) HandleConfigEvent(op srlndk.SdkMgrOperation, key *srlndk.ConfigKey, data *string)
- func (a *Agent) HandleGitConfigEvent(op srlndk.SdkMgrOperation, key *[]string, data *string)
- func (a *Agent) KeepAlive(ctx context.Context, period time.Duration)
- func (a *Agent) PushCommit(args *Args, ref *github.Reference, tree *github.Tree) (err error)
- func (a *Agent) StartAppIDNotificationStream(ctx context.Context, id uint32) chan *srlndk.NotificationStreamResponse
- func (a *Agent) StartBFDSessionNotificationStream(ctx context.Context, srcIP, dstIP net.IP, instance uint32) chan *srlndk.NotificationStreamResponse
- func (a *Agent) StartConfigNotificationStream(ctx context.Context) chan *srlndk.NotificationStreamResponse
- func (a *Agent) StartInterfaceNotificationStream(ctx context.Context, ifName string) chan *srlndk.NotificationStreamResponse
- func (a *Agent) StartLLDPNeighNotificationStream(ctx context.Context, ifName, chassisType, chassisID string) chan *srlndk.NotificationStreamResponse
- func (a *Agent) StartNwInstNotificationStream(ctx context.Context) chan *srlndk.NotificationStreamResponse
- func (a *Agent) StartRouteNotificationStream(ctx context.Context, netInstance string, ipAddr net.IP, prefixLen uint32) chan *srlndk.NotificationStreamResponse
- type Args
- type HandleFunc
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRPCRequest ¶
NewRPCRequest returns a new rpcRequest.
func StartJSONRPCServer ¶
func StartJSONRPCServer(a *Agent)
StartJSONRPCServer start a JSONRPC server and waits for connection
Types ¶
type Agent ¶
type Agent struct {
Name string
RetryTimer time.Duration
AppID uint32
GRPCConn *grpc.ClientConn
SdkMgrService struct {
Client srlndk.SdkMgrServiceClient
}
NotificationService struct {
Client srlndk.SdkNotificationServiceClient
}
TelemetryService struct {
Client srlndk.SdkMgrTelemetryServiceClient
}
RouteService struct {
Client srlndk.SdkMgrRouteServiceClient
}
MPLSRouteService struct {
Client srlndk.SdkMgrMplsRouteServiceClient
}
NextHopGroupService struct {
Client srlndk.SdkMgrNextHopGroupServiceClient
}
Config struct {
YangConfig *yangGit
// contains filtered or unexported fields
}
Github struct {
Ref *github.Reference
Tree *github.Tree
// contains filtered or unexported fields
}
}
Agent type
func (*Agent) CreatePR ¶
CreatePR creates a pull request. Based on: https://godoc.org/github.com/google/go-github/github#example-PullRequestsService-Create
func (*Agent) HandleConfigEvent ¶
HandleConfigEvent function
func (*Agent) HandleGitConfigEvent ¶
func (a *Agent) HandleGitConfigEvent(op srlndk.SdkMgrOperation, key *[]string, data *string)
HandleGitConfigEvent function
func (*Agent) PushCommit ¶
PushCommit creates the commit in the given reference using the given tree.
func (*Agent) StartAppIDNotificationStream ¶
func (a *Agent) StartAppIDNotificationStream(ctx context.Context, id uint32) chan *srlndk.NotificationStreamResponse
StartAppIDNotificationStream function
func (*Agent) StartBFDSessionNotificationStream ¶
func (a *Agent) StartBFDSessionNotificationStream(ctx context.Context, srcIP, dstIP net.IP, instance uint32) chan *srlndk.NotificationStreamResponse
StartBFDSessionNotificationStream function
func (*Agent) StartConfigNotificationStream ¶
func (a *Agent) StartConfigNotificationStream(ctx context.Context) chan *srlndk.NotificationStreamResponse
StartConfigNotificationStream function
func (*Agent) StartInterfaceNotificationStream ¶
func (a *Agent) StartInterfaceNotificationStream(ctx context.Context, ifName string) chan *srlndk.NotificationStreamResponse
StartInterfaceNotificationStream function
func (*Agent) StartLLDPNeighNotificationStream ¶
func (a *Agent) StartLLDPNeighNotificationStream(ctx context.Context, ifName, chassisType, chassisID string) chan *srlndk.NotificationStreamResponse
StartLLDPNeighNotificationStream function
func (*Agent) StartNwInstNotificationStream ¶
func (a *Agent) StartNwInstNotificationStream(ctx context.Context) chan *srlndk.NotificationStreamResponse
StartNwInstNotificationStream function
type HandleFunc ¶
type HandleFunc func(context.Context, *srlndk.NotificationStreamResponse)
HandleFunc function
Click to show internal directories.
Click to hide internal directories.