Documentation
¶
Index ¶
- Constants
- Variables
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetHostName() string
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- func (m *Config) Validate() error
- func (m *Config) ValidateAll() error
- type ConfigMultiError
- type ConfigValidationError
- type Plugin
Constants ¶
const (
Name = "demo"
)
Variables ¶
var File_types_plugins_demo_config_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { HostName string `protobuf:"bytes,1,opt,name=host_name,json=hostName,proto3" json:"host_name,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetHostName ¶
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 Plugin ¶
type Plugin struct { // PluginMethodDefaultImpl is the base class of plugin which provides the default implementation // to Plugin methods. plugins.PluginMethodDefaultImpl }
func (*Plugin) Config ¶
func (p *Plugin) Config() api.PluginConfig
Config returns api.PluginConfig's implementation used during configuration processing
func (*Plugin) NonBlockingPhases ¶ added in v0.5.0
NonBlockingPhases returns the phases of the plugin which can be run non-blockingly, default to 0. If a phase except OnLog only contains non-blocking plugins, it will be executed synchorously, which is more effective. Phase OnLog is always be executed synchorously so we don't need to specify it here.
If the plugin's filter in a specific phase doesn't contain any blocking operation, we can mark this phase as non-blocking phase. A blocking operation can be: 1. I/O operation 2. Sleep 3. Blocking syscall 4. Context switch like waiting on a channel and more.
Marking phases with blocking operations as non-blocking can lead to unexpected delays in worker scope. We recommend marking as conservatively as possible, i.e., only marking phases with simple code logic. For example, in HTNN we only marks
* PhaseDecodeData * PhaseEncodeHeaders * PhaseEncodeData
func (*Plugin) Order ¶
func (p *Plugin) Order() plugins.PluginOrder
Order returns the order of the plugin, default to OrderPositionUnspecified
func (*Plugin) Type ¶
func (p *Plugin) Type() plugins.PluginType
Type returns type of the plugin, default to TypeGeneral