Documentation
¶
Index ¶
- Variables
- func LookupConsumer(ns, pluginName, key string) (api.Consumer, bool)
- func UpdateConsumers(value *structpb.Struct)
- type Config
- type ConfigMultiError
- type ConfigValidationError
- type Consumer
- type ConsumerConfig
- func (*ConsumerConfig) Descriptor() ([]byte, []int)deprecated
- func (x *ConsumerConfig) GetKey() string
- func (conf *ConsumerConfig) Index() string
- func (*ConsumerConfig) ProtoMessage()
- func (x *ConsumerConfig) ProtoReflect() protoreflect.Message
- func (x *ConsumerConfig) Reset()
- func (x *ConsumerConfig) String() string
- func (m *ConsumerConfig) Validate() error
- func (m *ConsumerConfig) ValidateAll() error
- type ConsumerConfigMultiError
- type ConsumerConfigValidationError
- func (e ConsumerConfigValidationError) Cause() error
- func (e ConsumerConfigValidationError) Error() string
- func (e ConsumerConfigValidationError) ErrorName() string
- func (e ConsumerConfigValidationError) Field() string
- func (e ConsumerConfigValidationError) Key() bool
- func (e ConsumerConfigValidationError) Reason() string
- type MockConsumer
Constants ¶
This section is empty.
Variables ¶
var File_api_internal_consumer_config_proto protoreflect.FileDescriptor
Functions ¶
func LookupConsumer ¶
LookupConsumer returns the consumer config for the given namespace, plugin name and key.
func UpdateConsumers ¶
Types ¶
type Config ¶
type Config struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
func (*Config) Validate ¶
Validate checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Config) ValidateAll ¶
ValidateAll checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConfigMultiError, or nil if none found.
type ConfigMultiError ¶
type ConfigMultiError []error
ConfigMultiError is an error wrapping multiple validation errors returned by Config.ValidateAll() if the designated constraints aren't met.
func (ConfigMultiError) AllErrors ¶
func (m ConfigMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConfigMultiError) Error ¶
func (m ConfigMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ConfigValidationError ¶
type ConfigValidationError struct {
// contains filtered or unexported fields
}
ConfigValidationError is the validation error returned by Config.Validate if the designated constraints aren't met.
func (ConfigValidationError) Cause ¶
func (e ConfigValidationError) Cause() error
Cause function returns cause value.
func (ConfigValidationError) Error ¶
func (e ConfigValidationError) Error() string
Error satisfies the builtin error interface
func (ConfigValidationError) ErrorName ¶
func (e ConfigValidationError) ErrorName() string
ErrorName returns error name.
func (ConfigValidationError) Field ¶
func (e ConfigValidationError) Field() string
Field function returns field value.
func (ConfigValidationError) Key ¶
func (e ConfigValidationError) Key() bool
Key function returns key value.
func (ConfigValidationError) Reason ¶
func (e ConfigValidationError) Reason() string
Reason function returns reason value.
type Consumer ¶
type Consumer struct { csModel.Consumer ConsumerConfigs map[string]api.PluginConsumerConfig FilterConfigs map[string]*fmModel.ParsedFilterConfig // fields that generated from the configuration FilterNames []string InitOnce sync.Once CanSkipMethods map[string]bool CanSkipMethodsOnce sync.Once CanSyncRunMethod map[string]bool // contains filtered or unexported fields }
func (*Consumer) InitConfigs ¶
func (*Consumer) PluginConfig ¶
func (c *Consumer) PluginConfig(name string) api.PluginConsumerConfig
type ConsumerConfig ¶
type ConsumerConfig struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*ConsumerConfig) Descriptor
deprecated
func (*ConsumerConfig) Descriptor() ([]byte, []int)
Deprecated: Use ConsumerConfig.ProtoReflect.Descriptor instead.
func (*ConsumerConfig) GetKey ¶
func (x *ConsumerConfig) GetKey() string
func (*ConsumerConfig) Index ¶
func (conf *ConsumerConfig) Index() string
func (*ConsumerConfig) ProtoMessage ¶
func (*ConsumerConfig) ProtoMessage()
func (*ConsumerConfig) ProtoReflect ¶
func (x *ConsumerConfig) ProtoReflect() protoreflect.Message
func (*ConsumerConfig) Reset ¶
func (x *ConsumerConfig) Reset()
func (*ConsumerConfig) String ¶
func (x *ConsumerConfig) String() string
func (*ConsumerConfig) Validate ¶
func (m *ConsumerConfig) Validate() error
Validate checks the field values on ConsumerConfig with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ConsumerConfig) ValidateAll ¶
func (m *ConsumerConfig) ValidateAll() error
ValidateAll checks the field values on ConsumerConfig with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConsumerConfigMultiError, or nil if none found.
type ConsumerConfigMultiError ¶
type ConsumerConfigMultiError []error
ConsumerConfigMultiError is an error wrapping multiple validation errors returned by ConsumerConfig.ValidateAll() if the designated constraints aren't met.
func (ConsumerConfigMultiError) AllErrors ¶
func (m ConsumerConfigMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConsumerConfigMultiError) Error ¶
func (m ConsumerConfigMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ConsumerConfigValidationError ¶
type ConsumerConfigValidationError struct {
// contains filtered or unexported fields
}
ConsumerConfigValidationError is the validation error returned by ConsumerConfig.Validate if the designated constraints aren't met.
func (ConsumerConfigValidationError) Cause ¶
func (e ConsumerConfigValidationError) Cause() error
Cause function returns cause value.
func (ConsumerConfigValidationError) Error ¶
func (e ConsumerConfigValidationError) Error() string
Error satisfies the builtin error interface
func (ConsumerConfigValidationError) ErrorName ¶
func (e ConsumerConfigValidationError) ErrorName() string
ErrorName returns error name.
func (ConsumerConfigValidationError) Field ¶
func (e ConsumerConfigValidationError) Field() string
Field function returns field value.
func (ConsumerConfigValidationError) Key ¶
func (e ConsumerConfigValidationError) Key() bool
Key function returns key value.
func (ConsumerConfigValidationError) Reason ¶
func (e ConsumerConfigValidationError) Reason() string
Reason function returns reason value.
type MockConsumer ¶ added in v0.4.0
type MockConsumer struct { }
func (*MockConsumer) Name ¶ added in v0.4.0
func (c *MockConsumer) Name() string
func (*MockConsumer) PluginConfig ¶ added in v0.4.0
func (c *MockConsumer) PluginConfig(_ string) api.PluginConsumerConfig