Documentation
¶
Index ¶
- Constants
- Variables
- func NewNBClientWithConfig(ctx context.Context, cfg dbConfig) (client.Client, error)
- func NewOVSDBClientWithConfig(ctx context.Context, cfg dbConfig) (client.Client, error)
- type Cookie
- type SampleDecoder
- func (d *SampleDecoder) AddCollector(collectorID, groupID int, ownerName string) error
- func (d *SampleDecoder) DecodeCookie8Bytes(cookie [8]byte) (model.NetworkEvent, error)
- func (d *SampleDecoder) DecodeCookieBytes(cookie []byte) (model.NetworkEvent, error)
- func (d *SampleDecoder) DecodeCookieIDs(obsDomainID, obsPointID uint32) (model.NetworkEvent, error)
- func (d *SampleDecoder) DeleteCollector(collectorID int) error
- func (d *SampleDecoder) GetInterfaceUDNs() (map[string]string, error)
- func (d *SampleDecoder) Shutdown()
Constants ¶
const CookieSize = 8
const OVSDBTimeout = 10 * time.Second
Variables ¶
var SampleEndian = getEndian()
Functions ¶
func NewNBClientWithConfig ¶
Types ¶
type SampleDecoder ¶
type SampleDecoder struct {
// contains filtered or unexported fields
}
func NewSampleDecoder ¶
func NewSampleDecoder(ctx context.Context, nbdbSocketPath string) (*SampleDecoder, error)
NewSampleDecoder creates a new SampleDecoder and initializes the OVSDB client.
func NewSampleDecoderWithDefaultCollector ¶
func NewSampleDecoderWithDefaultCollector(ctx context.Context, nbdbSocketPath string, ownerName string, groupID int) (*SampleDecoder, error)
NewSampleDecoderWithDefaultCollector creates a new SampleDecoder, initializes the OVSDB client and adds the default collector. It allows to set the groupID and ownerName for the created default collector. If the default collector already exists with a different owner or different groupID an error will be returned. Shutdown should be called to clean up the collector from the OVSDB.
func (*SampleDecoder) AddCollector ¶
func (d *SampleDecoder) AddCollector(collectorID, groupID int, ownerName string) error
func (*SampleDecoder) DecodeCookie8Bytes ¶
func (d *SampleDecoder) DecodeCookie8Bytes(cookie [8]byte) (model.NetworkEvent, error)
func (*SampleDecoder) DecodeCookieBytes ¶
func (d *SampleDecoder) DecodeCookieBytes(cookie []byte) (model.NetworkEvent, error)
func (*SampleDecoder) DecodeCookieIDs ¶
func (d *SampleDecoder) DecodeCookieIDs(obsDomainID, obsPointID uint32) (model.NetworkEvent, error)
func (*SampleDecoder) DeleteCollector ¶
func (d *SampleDecoder) DeleteCollector(collectorID int) error
func (*SampleDecoder) GetInterfaceUDNs ¶
func (d *SampleDecoder) GetInterfaceUDNs() (map[string]string, error)
GetInterfaceUDNs returns a map of all pod interface names to their corresponding (C)UDN namespaced names. default network or NAD that is not created by (C)UDN is represented by an empty string. UDN namespace+name are joined by "/", CUDN will just have a name.
func (*SampleDecoder) Shutdown ¶
func (d *SampleDecoder) Shutdown()