client

package
v0.0.0-...-7a34c7c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package client provides a wrapper for GoBGP's gRPC API

Index

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

func (*AddPathByStreamClient) Send

func (c *AddPathByStreamClient) Send(paths ...*table.Path) 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

func NewWith(ctx context.Context, target string, opts ...grpc.DialOption) (*Client, error)

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) AddBMP

func (cli *Client) AddBMP(c *config.BmpServerConfig) error

func (*Client) AddDefinedSet

func (cli *Client) AddDefinedSet(d table.DefinedSet) error

func (*Client) AddNeighbor

func (cli *Client) AddNeighbor(c *config.Neighbor) error

func (*Client) AddPath

func (cli *Client) AddPath(pathList []*table.Path) ([]byte, error)

func (*Client) AddPathByStream

func (cli *Client) AddPathByStream() (*AddPathByStreamClient, error)

func (*Client) AddPolicy

func (cli *Client) AddPolicy(t *table.Policy, refer bool) error

func (*Client) AddPolicyAssignment

func (cli *Client) AddPolicyAssignment(assignment *table.PolicyAssignment) error

func (*Client) AddRPKIServer

func (cli *Client) AddRPKIServer(address string, port, lifetime int) error

func (*Client) AddStatement

func (cli *Client) AddStatement(t *table.Statement) error

func (*Client) AddVRF

func (*Client) AddVRFPath

func (cli *Client) AddVRFPath(vrfID string, pathList []*table.Path) ([]byte, error)

func (*Client) Close

func (cli *Client) Close() error

func (*Client) DeleteBMP

func (cli *Client) DeleteBMP(c *config.BmpServerConfig) error

func (*Client) DeleteDefinedSet

func (cli *Client) DeleteDefinedSet(d table.DefinedSet, all bool) error

func (*Client) DeleteNeighbor

func (cli *Client) DeleteNeighbor(c *config.Neighbor) error

func (*Client) DeletePath

func (cli *Client) DeletePath(pathList []*table.Path) error

func (*Client) DeletePathByFamily

func (cli *Client) DeletePathByFamily(family bgp.RouteFamily) error

func (*Client) DeletePathByUUID

func (cli *Client) DeletePathByUUID(uuid []byte) error

func (*Client) DeletePolicy

func (cli *Client) DeletePolicy(t *table.Policy, all, preserve bool) error

func (*Client) DeletePolicyAssignment

func (cli *Client) DeletePolicyAssignment(assignment *table.PolicyAssignment, all bool) error

func (*Client) DeleteRPKIServer

func (cli *Client) DeleteRPKIServer(address string) error

func (*Client) DeleteStatement

func (cli *Client) DeleteStatement(t *table.Statement, all bool) error

func (*Client) DeleteVRF

func (cli *Client) DeleteVRF(name string) error

func (*Client) DeleteVRFPath

func (cli *Client) DeleteVRFPath(vrfID string, pathList []*table.Path) error

func (*Client) DisableNeighbor

func (cli *Client) DisableNeighbor(addr, communication string) error

func (*Client) DisableRPKIServer

func (cli *Client) DisableRPKIServer(address string) error

func (*Client) EnableNeighbor

func (cli *Client) EnableNeighbor(addr string) error

func (*Client) EnableRPKIServer

func (cli *Client) EnableRPKIServer(address string) error

func (*Client) EnableZebra

func (cli *Client) EnableZebra(c *config.Zebra) error

func (*Client) GetAdjRIBIn

func (cli *Client) GetAdjRIBIn(name string, family bgp.RouteFamily, prefixes []*table.LookupPrefix) (*table.Table, error)

func (*Client) GetAdjRIBInInfo

func (cli *Client) GetAdjRIBInInfo(name string, family bgp.RouteFamily) (*table.TableInfo, error)

func (*Client) GetAdjRIBOut

func (cli *Client) GetAdjRIBOut(name string, family bgp.RouteFamily, prefixes []*table.LookupPrefix) (*table.Table, error)

func (*Client) GetAdjRIBOutInfo

func (cli *Client) GetAdjRIBOutInfo(name string, family bgp.RouteFamily) (*table.TableInfo, error)

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 (cli *Client) GetLocalRIBInfo(name string, family bgp.RouteFamily) (*table.TableInfo, error)

func (*Client) GetNeighbor

func (cli *Client) GetNeighbor(name string, options ...bool) (*config.Neighbor, error)

func (*Client) GetPolicy

func (cli *Client) GetPolicy() ([]*table.Policy, error)

func (*Client) GetRIB

func (cli *Client) GetRIB(family bgp.RouteFamily, prefixes []*table.LookupPrefix) (*table.Table, error)

func (*Client) GetRIBInfo

func (cli *Client) GetRIBInfo(family bgp.RouteFamily) (*table.TableInfo, error)

func (*Client) GetROA

func (cli *Client) GetROA(family bgp.RouteFamily) ([]*table.ROA, error)

func (*Client) GetRPKI

func (cli *Client) GetRPKI() ([]*config.RpkiServer, error)

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) GetServer

func (cli *Client) GetServer() (*config.Global, error)

func (*Client) GetStatement

func (cli *Client) GetStatement() ([]*table.Statement, error)

func (*Client) GetVRF

func (cli *Client) GetVRF() ([]*table.Vrf, error)

func (*Client) GetVRFRIB

func (cli *Client) GetVRFRIB(name string, family bgp.RouteFamily, prefixes []*table.LookupPrefix) (*table.Table, error)

func (*Client) ListNeighbor

func (cli *Client) ListNeighbor() ([]*config.Neighbor, error)

func (*Client) ListNeighborByTransport

func (cli *Client) ListNeighborByTransport(afi int) ([]*config.Neighbor, error)

func (*Client) ListNeighborByVRF

func (cli *Client) ListNeighborByVRF(vrf string) ([]*config.Neighbor, error)

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 (cli *Client) ReplacePolicy(t *table.Policy, refer, preserve bool) error

func (*Client) ReplacePolicyAssignment

func (cli *Client) ReplacePolicyAssignment(assignment *table.PolicyAssignment) error

func (*Client) ReplaceStatement

func (cli *Client) ReplaceStatement(t *table.Statement) error

func (*Client) ResetNeighbor

func (cli *Client) ResetNeighbor(addr, communication string) error

func (*Client) ResetRPKIServer

func (cli *Client) ResetRPKIServer(address string) error

func (*Client) ShutdownNeighbor

func (cli *Client) ShutdownNeighbor(addr, communication string) error

func (*Client) SoftReset

func (cli *Client) SoftReset(addr string, family bgp.RouteFamily) error

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 (cli *Client) SoftResetRPKIServer(address string) error

func (*Client) StartServer

func (cli *Client) StartServer(c *config.Global) error

func (*Client) StopServer

func (cli *Client) StopServer() error

func (*Client) ValidateRIBWithRPKI

func (cli *Client) ValidateRIBWithRPKI(prefixes ...string) error

type MonitorNeighborStateClient

type MonitorNeighborStateClient struct {
	// contains filtered or unexported fields
}

func (*MonitorNeighborStateClient) Recv

type MonitorRIBClient

type MonitorRIBClient struct {
	// contains filtered or unexported fields
}

func (*MonitorRIBClient) Recv

func (c *MonitorRIBClient) Recv() (*table.Destination, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL