Documentation ¶
Overview ¶
Package client provides a wrapper for GoBGP's gRPC API
Index ¶
- type AddPathByStreamClient
- type Client
- func (cli *Client) AddBMP(c *config.BmpServerConfig) error
- func (cli *Client) AddDefinedSet(d table.DefinedSet) error
- func (cli *Client) AddNeighbor(c *config.Neighbor) error
- func (cli *Client) AddPath(pathList []*table.Path) ([]byte, error)
- func (cli *Client) AddPathByStream() (*AddPathByStreamClient, error)
- func (cli *Client) AddPolicy(t *table.Policy, refer bool) error
- func (cli *Client) AddPolicyAssignment(assignment *table.PolicyAssignment) error
- func (cli *Client) AddRPKIServer(address string, port, lifetime int) error
- func (cli *Client) AddStatement(t *table.Statement) error
- func (cli *Client) AddVRF(name string, id int, rd bgp.RouteDistinguisherInterface, ...) error
- func (cli *Client) AddVRFPath(vrfID string, pathList []*table.Path) ([]byte, error)
- func (cli *Client) Close() error
- func (cli *Client) DeleteBMP(c *config.BmpServerConfig) error
- func (cli *Client) DeleteDefinedSet(d table.DefinedSet, all bool) error
- func (cli *Client) DeleteNeighbor(c *config.Neighbor) error
- func (cli *Client) DeletePath(pathList []*table.Path) error
- func (cli *Client) DeletePathByFamily(family bgp.RouteFamily) error
- func (cli *Client) DeletePathByUUID(uuid []byte) error
- func (cli *Client) DeletePolicy(t *table.Policy, all, preserve bool) error
- func (cli *Client) DeletePolicyAssignment(assignment *table.PolicyAssignment, all bool) error
- func (cli *Client) DeleteRPKIServer(address string) error
- func (cli *Client) DeleteStatement(t *table.Statement, all bool) error
- func (cli *Client) DeleteVRF(name string) error
- func (cli *Client) DeleteVRFPath(vrfID string, pathList []*table.Path) error
- func (cli *Client) DisableNeighbor(addr, communication string) error
- func (cli *Client) DisableRPKIServer(address string) error
- func (cli *Client) EnableNeighbor(addr string) error
- func (cli *Client) EnableRPKIServer(address string) error
- func (cli *Client) EnableZebra(c *config.Zebra) error
- func (cli *Client) GetAdjRIBIn(name string, family bgp.RouteFamily, prefixes []*table.LookupPrefix) (*table.Table, error)
- func (cli *Client) GetAdjRIBInInfo(name string, family bgp.RouteFamily) (*table.TableInfo, error)
- func (cli *Client) GetAdjRIBOut(name string, family bgp.RouteFamily, prefixes []*table.LookupPrefix) (*table.Table, error)
- func (cli *Client) GetAdjRIBOutInfo(name string, family bgp.RouteFamily) (*table.TableInfo, error)
- func (cli *Client) GetDefinedSet(typ table.DefinedType) ([]table.DefinedSet, error)
- func (cli *Client) GetDefinedSetByName(typ table.DefinedType, name string) (table.DefinedSet, error)
- func (cli *Client) GetExportPolicy() (*table.PolicyAssignment, error)
- func (cli *Client) GetImportPolicy() (*table.PolicyAssignment, error)
- func (cli *Client) GetLocalRIB(name string, family bgp.RouteFamily, prefixes []*table.LookupPrefix) (*table.Table, error)
- func (cli *Client) GetLocalRIBInfo(name string, family bgp.RouteFamily) (*table.TableInfo, error)
- func (cli *Client) GetNeighbor(name string, options ...bool) (*config.Neighbor, error)
- func (cli *Client) GetPolicy() ([]*table.Policy, error)
- func (cli *Client) GetRIB(family bgp.RouteFamily, prefixes []*table.LookupPrefix) (*table.Table, error)
- func (cli *Client) GetRIBInfo(family bgp.RouteFamily) (*table.TableInfo, error)
- func (cli *Client) GetROA(family bgp.RouteFamily) ([]*table.ROA, error)
- func (cli *Client) GetRPKI() ([]*config.RpkiServer, error)
- func (cli *Client) GetRouteServerExportPolicy(name string) (*table.PolicyAssignment, error)
- func (cli *Client) GetRouteServerImportPolicy(name string) (*table.PolicyAssignment, error)
- func (cli *Client) GetRouteServerInPolicy(name string) (*table.PolicyAssignment, error)
- func (cli *Client) GetServer() (*config.Global, error)
- func (cli *Client) GetStatement() ([]*table.Statement, error)
- func (cli *Client) GetVRF() ([]*table.Vrf, error)
- func (cli *Client) GetVRFRIB(name string, family bgp.RouteFamily, prefixes []*table.LookupPrefix) (*table.Table, error)
- func (cli *Client) ListNeighbor() ([]*config.Neighbor, error)
- func (cli *Client) ListNeighborByTransport(afi int) ([]*config.Neighbor, error)
- func (cli *Client) ListNeighborByVRF(vrf string) ([]*config.Neighbor, error)
- func (cli *Client) MonitorAdjRIBIn(name string, family bgp.RouteFamily, current bool) (*MonitorRIBClient, error)
- func (cli *Client) MonitorNeighborState(names ...string) (*MonitorNeighborStateClient, error)
- func (cli *Client) MonitorRIB(family bgp.RouteFamily, current bool) (*MonitorRIBClient, error)
- func (cli *Client) ReplaceDefinedSet(d table.DefinedSet) error
- func (cli *Client) ReplacePolicy(t *table.Policy, refer, preserve bool) error
- func (cli *Client) ReplacePolicyAssignment(assignment *table.PolicyAssignment) error
- func (cli *Client) ReplaceStatement(t *table.Statement) error
- func (cli *Client) ResetNeighbor(addr, communication string) error
- func (cli *Client) ResetRPKIServer(address string) error
- func (cli *Client) ShutdownNeighbor(addr, communication string) error
- func (cli *Client) SoftReset(addr string, family bgp.RouteFamily) error
- func (cli *Client) SoftResetIn(addr string, family bgp.RouteFamily) error
- func (cli *Client) SoftResetOut(addr string, family bgp.RouteFamily) error
- func (cli *Client) SoftResetRPKIServer(address string) error
- func (cli *Client) StartServer(c *config.Global) error
- func (cli *Client) StopServer() error
- func (cli *Client) ValidateRIBWithRPKI(prefixes ...string) error
- type MonitorNeighborStateClient
- type MonitorRIBClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddPathByStreamClient ¶
type AddPathByStreamClient struct {
// contains filtered or unexported fields
}
func (*AddPathByStreamClient) Close ¶
func (c *AddPathByStreamClient) Close() error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(target string, opts ...grpc.DialOption) (*Client, error)
New returns a new Client using the given target and options for dialing to the grpc server. If an error occurs during dialing it will be returned and Client will be nil.
func NewFrom ¶
func NewFrom(conn *grpc.ClientConn, cli api.GobgpApiClient) *Client
NewFrom returns a new Client, using the given conn and cli for the underlying connection. The given grpc.ClientConn connection is expected to be initialized and paired with the api client. See New to have the connection dialed for you.
func NewWith ¶
NewWith is like New, but uses the given ctx to cancel or expire the current attempt to connect if it becomes Done before the connection succeeds.
func (*Client) AddDefinedSet ¶
func (cli *Client) AddDefinedSet(d table.DefinedSet) error
func (*Client) AddPathByStream ¶
func (cli *Client) AddPathByStream() (*AddPathByStreamClient, error)
func (*Client) AddPolicyAssignment ¶
func (cli *Client) AddPolicyAssignment(assignment *table.PolicyAssignment) error
func (*Client) AddRPKIServer ¶
func (*Client) AddVRF ¶
func (cli *Client) AddVRF(name string, id int, rd bgp.RouteDistinguisherInterface, im, ex []bgp.ExtendedCommunityInterface) error
func (*Client) AddVRFPath ¶
func (*Client) DeleteDefinedSet ¶
func (cli *Client) DeleteDefinedSet(d table.DefinedSet, all bool) error
func (*Client) DeletePathByFamily ¶
func (cli *Client) DeletePathByFamily(family bgp.RouteFamily) error
func (*Client) DeletePathByUUID ¶
func (*Client) DeletePolicy ¶
func (*Client) DeletePolicyAssignment ¶
func (cli *Client) DeletePolicyAssignment(assignment *table.PolicyAssignment, all bool) error
func (*Client) DeleteRPKIServer ¶
func (*Client) DeleteStatement ¶
func (*Client) DeleteVRFPath ¶
func (*Client) DisableNeighbor ¶
func (*Client) DisableRPKIServer ¶
func (*Client) EnableNeighbor ¶
func (*Client) EnableRPKIServer ¶
func (*Client) GetAdjRIBIn ¶
func (cli *Client) GetAdjRIBIn(name string, family bgp.RouteFamily, prefixes []*table.LookupPrefix) (*table.Table, error)
func (*Client) GetAdjRIBInInfo ¶
func (*Client) GetAdjRIBOut ¶
func (cli *Client) GetAdjRIBOut(name string, family bgp.RouteFamily, prefixes []*table.LookupPrefix) (*table.Table, error)
func (*Client) GetAdjRIBOutInfo ¶
func (*Client) GetDefinedSet ¶
func (cli *Client) GetDefinedSet(typ table.DefinedType) ([]table.DefinedSet, error)
func (*Client) GetDefinedSetByName ¶
func (cli *Client) GetDefinedSetByName(typ table.DefinedType, name string) (table.DefinedSet, error)
func (*Client) GetExportPolicy ¶
func (cli *Client) GetExportPolicy() (*table.PolicyAssignment, error)
func (*Client) GetImportPolicy ¶
func (cli *Client) GetImportPolicy() (*table.PolicyAssignment, error)
func (*Client) GetLocalRIB ¶
func (cli *Client) GetLocalRIB(name string, family bgp.RouteFamily, prefixes []*table.LookupPrefix) (*table.Table, error)
func (*Client) GetLocalRIBInfo ¶
func (*Client) GetNeighbor ¶
func (*Client) GetRIB ¶
func (cli *Client) GetRIB(family bgp.RouteFamily, prefixes []*table.LookupPrefix) (*table.Table, error)
func (*Client) GetRIBInfo ¶
func (*Client) GetRouteServerExportPolicy ¶
func (cli *Client) GetRouteServerExportPolicy(name string) (*table.PolicyAssignment, error)
func (*Client) GetRouteServerImportPolicy ¶
func (cli *Client) GetRouteServerImportPolicy(name string) (*table.PolicyAssignment, error)
func (*Client) GetRouteServerInPolicy ¶
func (cli *Client) GetRouteServerInPolicy(name string) (*table.PolicyAssignment, error)
func (*Client) GetVRFRIB ¶
func (cli *Client) GetVRFRIB(name string, family bgp.RouteFamily, prefixes []*table.LookupPrefix) (*table.Table, error)
func (*Client) ListNeighborByTransport ¶
func (*Client) ListNeighborByVRF ¶
func (*Client) MonitorAdjRIBIn ¶
func (cli *Client) MonitorAdjRIBIn(name string, family bgp.RouteFamily, current bool) (*MonitorRIBClient, error)
func (*Client) MonitorNeighborState ¶
func (cli *Client) MonitorNeighborState(names ...string) (*MonitorNeighborStateClient, error)
func (*Client) MonitorRIB ¶
func (cli *Client) MonitorRIB(family bgp.RouteFamily, current bool) (*MonitorRIBClient, error)
func (*Client) ReplaceDefinedSet ¶
func (cli *Client) ReplaceDefinedSet(d table.DefinedSet) error
func (*Client) ReplacePolicy ¶
func (*Client) ReplacePolicyAssignment ¶
func (cli *Client) ReplacePolicyAssignment(assignment *table.PolicyAssignment) error
func (*Client) ResetNeighbor ¶
func (*Client) ResetRPKIServer ¶
func (*Client) ShutdownNeighbor ¶
func (*Client) SoftResetIn ¶
func (cli *Client) SoftResetIn(addr string, family bgp.RouteFamily) error
func (*Client) SoftResetOut ¶
func (cli *Client) SoftResetOut(addr string, family bgp.RouteFamily) error
func (*Client) SoftResetRPKIServer ¶
func (*Client) StopServer ¶
func (*Client) ValidateRIBWithRPKI ¶
type MonitorNeighborStateClient ¶
type MonitorNeighborStateClient struct {
// contains filtered or unexported fields
}
type MonitorRIBClient ¶
type MonitorRIBClient struct {
// contains filtered or unexported fields
}
func (*MonitorRIBClient) Recv ¶
func (c *MonitorRIBClient) Recv() (*table.Destination, error)
Click to show internal directories.
Click to hide internal directories.