Documentation ¶
Overview ¶
Package excludedprefixes provides a networkservice.NetworkServiceServer chain element that can read excluded prefixes from config map and add them to request to avoid repeated usage.
Index ¶
Constants ¶
const (
// PrefixesFilePathDefault - excluded prefixes file absolute path
PrefixesFilePathDefault = nsmConfigDir + "/" + prefixesFile
)
These variables set default path to the config file
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶ added in v1.2.0
func NewClient(opts ...ClientOption) networkservice.NetworkServiceClient
NewClient - creates a networkservice.NetworkServiceClient chain element that excludes prefixes already used by other NetworkServices
func NewServer ¶
func NewServer(ctx context.Context, setters ...ServerOption) networkservice.NetworkServiceServer
NewServer - creates a networkservice.NetworkServiceServer chain element that can read excluded prefixes from config map and add them to request to avoid repeated usage. Note: request.Connection and Connection.Context should not be nil when calling Request
Types ¶
type ClientOption ¶ added in v1.3.0
type ClientOption func(client *excludedPrefixesClient)
ClientOption - method for excludedPrefixesClient
func WithAwarenessGroups ¶ added in v1.3.0
func WithAwarenessGroups(awarenessGroups [][]*url.URL) ClientOption
WithAwarenessGroups - returns method that sets awarenessGroups in excludedPrefixesClient
type ServerOption ¶
type ServerOption func(server *excludedPrefixesServer)
ServerOption - method for excludedPrefixesServer
func WithConfigPath ¶
func WithConfigPath(s string) ServerOption
WithConfigPath - returns method that set configPath in excludedPrefixesServer