consumer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsumerManagerFactory

func ConsumerManagerFactory(c interface{}, callbacks capi.FilterCallbackHandler) capi.StreamFilter

func LookupConsumer

func LookupConsumer(ns, pluginName, key string) (api.Consumer, bool)

LookupConsumer returns the consumer config for the given namespace, plugin name and key.

Types

type Consumer

type Consumer struct {
	Auth    map[string]string              `json:"auth"`
	Filters map[string]*model.FilterConfig `json:"filters,omitempty"`

	ConsumerConfigs map[string]api.PluginConsumerConfig  `json:"-"`
	FilterConfigs   map[string]*model.ParsedFilterConfig `json:"-"`

	// fields that generated from the configuration
	CanSkipMethod  map[string]bool
	FilterNames    []string
	FilterWrappers []*model.FilterWrapper
	// contains filtered or unexported fields
}

func (*Consumer) InitConfigs

func (c *Consumer) InitConfigs() error

func (*Consumer) Marshal

func (c *Consumer) Marshal() string

func (*Consumer) Name

func (c *Consumer) Name() string

Implement pkg.filtermanager.api.Consumer

func (*Consumer) PluginConfig

func (c *Consumer) PluginConfig(name string) api.PluginConsumerConfig

func (*Consumer) Unmarshal

func (c *Consumer) Unmarshal(s string) error

type ConsumerManagerConfigParser

type ConsumerManagerConfigParser struct {
}

func (*ConsumerManagerConfigParser) Merge

func (p *ConsumerManagerConfigParser) Merge(parent interface{}, child interface{}) interface{}

func (*ConsumerManagerConfigParser) Parse

func (p *ConsumerManagerConfigParser) Parse(any *anypb.Any, callbacks capi.ConfigCallbackHandler) (interface{}, error)

Jump to

Keyboard shortcuts

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