bgp

package
v1.13.11 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for bgp API

func (*Client) GetBgpPeers

func (a *Client) GetBgpPeers(params *GetBgpPeersParams, opts ...ClientOption) (*GetBgpPeersOK, error)
GetBgpPeers lists operational state of b g p peers

Retrieves current operational state of BGP peers created by

Cilium BGP virtual router. This includes session state, uptime, information per address family, etc.

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	GetBgpPeers(params *GetBgpPeersParams, opts ...ClientOption) (*GetBgpPeersOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new bgp API client.

type GetBgpPeersOK

type GetBgpPeersOK struct {
	Payload []*models.BgpPeer
}

GetBgpPeersOK describes a response with status code 200, with default header values.

Success

func NewGetBgpPeersOK

func NewGetBgpPeersOK() *GetBgpPeersOK

NewGetBgpPeersOK creates a GetBgpPeersOK with default headers values

func (*GetBgpPeersOK) Error

func (o *GetBgpPeersOK) Error() string

func (*GetBgpPeersOK) GetPayload

func (o *GetBgpPeersOK) GetPayload() []*models.BgpPeer

func (*GetBgpPeersOK) IsClientError

func (o *GetBgpPeersOK) IsClientError() bool

IsClientError returns true when this get bgp peers o k response has a 4xx status code

func (*GetBgpPeersOK) IsCode

func (o *GetBgpPeersOK) IsCode(code int) bool

IsCode returns true when this get bgp peers o k response a status code equal to that given

func (*GetBgpPeersOK) IsRedirect

func (o *GetBgpPeersOK) IsRedirect() bool

IsRedirect returns true when this get bgp peers o k response has a 3xx status code

func (*GetBgpPeersOK) IsServerError

func (o *GetBgpPeersOK) IsServerError() bool

IsServerError returns true when this get bgp peers o k response has a 5xx status code

func (*GetBgpPeersOK) IsSuccess

func (o *GetBgpPeersOK) IsSuccess() bool

IsSuccess returns true when this get bgp peers o k response has a 2xx status code

func (*GetBgpPeersOK) String

func (o *GetBgpPeersOK) String() string

type GetBgpPeersParams

type GetBgpPeersParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetBgpPeersParams contains all the parameters to send to the API endpoint

for the get bgp peers operation.

Typically these are written to a http.Request.

func NewGetBgpPeersParams

func NewGetBgpPeersParams() *GetBgpPeersParams

NewGetBgpPeersParams creates a new GetBgpPeersParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewGetBgpPeersParamsWithContext

func NewGetBgpPeersParamsWithContext(ctx context.Context) *GetBgpPeersParams

NewGetBgpPeersParamsWithContext creates a new GetBgpPeersParams object with the ability to set a context for a request.

func NewGetBgpPeersParamsWithHTTPClient

func NewGetBgpPeersParamsWithHTTPClient(client *http.Client) *GetBgpPeersParams

NewGetBgpPeersParamsWithHTTPClient creates a new GetBgpPeersParams object with the ability to set a custom HTTPClient for a request.

func NewGetBgpPeersParamsWithTimeout

func NewGetBgpPeersParamsWithTimeout(timeout time.Duration) *GetBgpPeersParams

NewGetBgpPeersParamsWithTimeout creates a new GetBgpPeersParams object with the ability to set a timeout on a request.

func (*GetBgpPeersParams) SetContext

func (o *GetBgpPeersParams) SetContext(ctx context.Context)

SetContext adds the context to the get bgp peers params

func (*GetBgpPeersParams) SetDefaults

func (o *GetBgpPeersParams) SetDefaults()

SetDefaults hydrates default values in the get bgp peers params (not the query body).

All values with no default are reset to their zero value.

func (*GetBgpPeersParams) SetHTTPClient

func (o *GetBgpPeersParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get bgp peers params

func (*GetBgpPeersParams) SetTimeout

func (o *GetBgpPeersParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get bgp peers params

func (*GetBgpPeersParams) WithContext

func (o *GetBgpPeersParams) WithContext(ctx context.Context) *GetBgpPeersParams

WithContext adds the context to the get bgp peers params

func (*GetBgpPeersParams) WithDefaults

func (o *GetBgpPeersParams) WithDefaults() *GetBgpPeersParams

WithDefaults hydrates default values in the get bgp peers params (not the query body).

All values with no default are reset to their zero value.

func (*GetBgpPeersParams) WithHTTPClient

func (o *GetBgpPeersParams) WithHTTPClient(client *http.Client) *GetBgpPeersParams

WithHTTPClient adds the HTTPClient to the get bgp peers params

func (*GetBgpPeersParams) WithTimeout

func (o *GetBgpPeersParams) WithTimeout(timeout time.Duration) *GetBgpPeersParams

WithTimeout adds the timeout to the get bgp peers params

func (*GetBgpPeersParams) WriteToRequest

func (o *GetBgpPeersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type GetBgpPeersReader

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

GetBgpPeersReader is a Reader for the GetBgpPeers structure.

func (*GetBgpPeersReader) ReadResponse

func (o *GetBgpPeersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

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