actions

package
v0.0.3-pre4.0...-0ec3cfc Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASPathPrependAction

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

func NewASPathPrependAction

func NewASPathPrependAction(asn uint32, times uint16) *ASPathPrependAction

func (*ASPathPrependAction) Do

func (a *ASPathPrependAction) Do(p *net.Prefix, pa *route.Path) Result

func (*ASPathPrependAction) Equal

func (a *ASPathPrependAction) Equal(b Action) bool

Equal compares actions

type AcceptAction

type AcceptAction struct {
}

AcceptAction accepts a path and terminates processing of filters

func NewAcceptAction

func NewAcceptAction() *AcceptAction

NewAcceptAction returns a new AcceptAction

func (*AcceptAction) Do

func (*AcceptAction) Do(p *net.Prefix, pa *route.Path) Result

Do applies the action

func (*AcceptAction) Equal

func (a *AcceptAction) Equal(b Action) bool

Equal compares actions

type Action

type Action interface {
	Do(p *net.Prefix, pa *route.Path) Result
	Equal(x Action) bool
}

Action performs actions on a `route.Path`

type AddCommunityAction

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

func NewAddCommunityAction

func NewAddCommunityAction(coms *types.Communities) *AddCommunityAction

func (*AddCommunityAction) Do

func (a *AddCommunityAction) Do(p net.Prefix, pa *route.Path) Result

type AddLargeCommunityAction

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

func NewAddLargeCommunityAction

func NewAddLargeCommunityAction(coms *types.LargeCommunities) *AddLargeCommunityAction

func (*AddLargeCommunityAction) Do

type RejectAction

type RejectAction struct {
}

RejectAction rejects a prefix and terminates filter processing

func NewRejectAction

func NewRejectAction() *RejectAction

func (*RejectAction) Do

func (*RejectAction) Do(p *net.Prefix, pa *route.Path) Result

func (*RejectAction) Equal

func (a *RejectAction) Equal(b Action) bool

Equal compares actions

type Result

type Result struct {
	Path      *route.Path
	Reject    bool
	Terminate bool
}

Result is a filter result

type SetLocalPrefAction

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

func NewSetLocalPrefAction

func NewSetLocalPrefAction(pref uint32) *SetLocalPrefAction

func (*SetLocalPrefAction) Do

func (a *SetLocalPrefAction) Do(p *net.Prefix, pa *route.Path) Result

func (*SetLocalPrefAction) Equal

func (a *SetLocalPrefAction) Equal(b Action) bool

Equal compares actions

type SetMEDAction

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

SetMEDAction sets the BGP MED

func NewSetMEDAction

func NewSetMEDAction(med uint32) *SetMEDAction

NewSetMEDAction creates new SetMEDAction

func (*SetMEDAction) Do

func (a *SetMEDAction) Do(p *net.Prefix, pa *route.Path) Result

Do applies the action

func (*SetMEDAction) Equal

func (a *SetMEDAction) Equal(b Action) bool

Equal compares actions

type SetNextHopAction

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

func NewSetNextHopAction

func NewSetNextHopAction(ip *bnet.IP) *SetNextHopAction

func (*SetNextHopAction) Do

func (a *SetNextHopAction) Do(p *net.Prefix, pa *route.Path) Result

func (*SetNextHopAction) Equal

func (a *SetNextHopAction) Equal(b Action) bool

Equal compares actions

Jump to

Keyboard shortcuts

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