Documentation ¶
Index ¶
- func NewWorkflow(ctx context.Context, core adapter.Core, logger log.Logger, tag string, ...) (adapter.Workflow, error)
- type Rule
- type RuleExec
- type RuleExecOptions
- type RuleItemExec
- type RuleItemExecOptions
- type RuleItemMatch
- type RuleItemMatchOptions
- type RuleMatchAnd
- type RuleMatchAndOptions
- type RuleMatchOr
- type RuleMatchOrOptions
- type RuleOptions
- type Workflow
- type WorkflowOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RuleExecOptions ¶
type RuleExecOptions struct {
Execs []yaml.Node `yaml:"exec,omitempty"`
}
type RuleItemExec ¶
type RuleItemExec struct {
// contains filtered or unexported fields
}
func (*RuleItemExec) UnmarshalYAML ¶
func (r *RuleItemExec) UnmarshalYAML(unmarshal func(interface{}) error) error
type RuleItemExecOptions ¶
type RuleItemExecOptions struct { Mark yaml.Node `yaml:"mark,omitempty"` Metadata yaml.Node `yaml:"metadata,omitempty"` Plugin yaml.Node `yaml:"plugin,omitempty"` Upstream yaml.Node `yaml:"upstream,omitempty"` JumpTo yaml.Node `yaml:"jump-to,omitempty"` GoTo yaml.Node `yaml:"go-to,omitempty"` WorkflowRules yaml.Node `yaml:"workflow-rules,omitempty"` Fallback yaml.Node `yaml:"fallback,omitempty"` Parallel yaml.Node `yaml:"parallel,omitempty"` SetTTL yaml.Node `yaml:"set-ttl,omitempty"` SetRespIP yaml.Node `yaml:"set-resp-ip,omitempty"` Clean yaml.Node `yaml:"clean,omitempty"` Return yaml.Node `yaml:"return,omitempty"` }
type RuleItemMatch ¶
type RuleItemMatch struct {
// contains filtered or unexported fields
}
func (*RuleItemMatch) UnmarshalYAML ¶
func (r *RuleItemMatch) UnmarshalYAML(unmarshal func(interface{}) error) error
type RuleItemMatchOptions ¶
type RuleItemMatchOptions struct { Listener yaml.Node `yaml:"listener,omitempty"` ClientIP yaml.Node `yaml:"client-ip,omitempty"` QType yaml.Node `yaml:"qtype,omitempty"` QName yaml.Node `yaml:"qname,omitempty"` HasRespMsg yaml.Node `yaml:"has-resp-msg,omitempty"` RespIP yaml.Node `yaml:"resp-ip,omitempty"` Mark yaml.Node `yaml:"mark,omitempty"` Env yaml.Node `yaml:"env,omitempty"` Metadata yaml.Node `yaml:"metadata,omitempty"` Plugin yaml.Node `yaml:"plugin,omitempty"` MatchOr yaml.Node `yaml:"match-or,omitempty"` MatchAnd yaml.Node `yaml:"match-and,omitempty"` // Invert bool `yaml:"invert,omitempty"` }
type RuleMatchAnd ¶
type RuleMatchAnd struct { MatchAnds []*RuleItemMatch ElseExecs []*RuleItemExec Execs []*RuleItemExec }
func (*RuleMatchAnd) Exec ¶
func (r *RuleMatchAnd) Exec(ctx context.Context, core adapter.Core, logger log.Logger, dnsCtx *adapter.DNSContext) (adapter.ReturnMode, error)
func (*RuleMatchAnd) UnmarshalYAML ¶
func (r *RuleMatchAnd) UnmarshalYAML(unmarshal func(any) error) error
type RuleMatchAndOptions ¶
type RuleMatchAndOptions struct { MatchAnds []yaml.Node `yaml:"match-and,omitempty"` ElseExecs []yaml.Node `yaml:"else-exec,omitempty"` Execs []yaml.Node `yaml:"exec,omitempty"` }
type RuleMatchOr ¶
type RuleMatchOr struct { MatchOrs []*RuleItemMatch ElseExecs []*RuleItemExec Execs []*RuleItemExec }
func (*RuleMatchOr) Exec ¶
func (o *RuleMatchOr) Exec(ctx context.Context, core adapter.Core, logger log.Logger, dnsCtx *adapter.DNSContext) (adapter.ReturnMode, error)
func (*RuleMatchOr) UnmarshalYAML ¶
func (r *RuleMatchOr) UnmarshalYAML(unmarshal func(any) error) error
type RuleMatchOrOptions ¶
type RuleMatchOrOptions struct { MatchOrs []yaml.Node `yaml:"match-or,omitempty"` ElseExecs []yaml.Node `yaml:"else-exec,omitempty"` Execs []yaml.Node `yaml:"exec,omitempty"` }
type RuleOptions ¶
type RuleOptions struct {
// contains filtered or unexported fields
}
func (*RuleOptions) UnmarshalYAML ¶
func (r *RuleOptions) UnmarshalYAML(unmarshal func(interface{}) error) error
type Workflow ¶
type Workflow struct {
// contains filtered or unexported fields
}
func (*Workflow) Exec ¶
func (w *Workflow) Exec(ctx context.Context, dnsCtx *adapter.DNSContext) (adapter.ReturnMode, error)
type WorkflowOptions ¶
type WorkflowOptions struct { Tag string `yaml:"tag"` Rules utils.Listable[RuleOptions] `yaml:"rules"` }
Source Files ¶
- item_executor_rule_clean.go
- item_executor_rule_fallback.go
- item_executor_rule_go_to.go
- item_executor_rule_jump_to.go
- item_executor_rule_mark.go
- item_executor_rule_metadata.go
- item_executor_rule_parallel.go
- item_executor_rule_plugin_executor.go
- item_executor_rule_return.go
- item_executor_rule_set_resp_ip.go
- item_executor_rule_set_ttl.go
- item_executor_rule_upstream.go
- item_executor_rule_workflow_rules.go
- item_matcher_rule_client_ip.go
- item_matcher_rule_env.go
- item_matcher_rule_has_resp_msg.go
- item_matcher_rule_listener.go
- item_matcher_rule_mark.go
- item_matcher_rule_match_and.go
- item_matcher_rule_match_or.go
- item_matcher_rule_metadata.go
- item_matcher_rule_plugin_matcher.go
- item_matcher_rule_qname.go
- item_matcher_rule_qtype.go
- item_matcher_rule_resp_ip.go
- rule.go
- rule_exec.go
- rule_item_exec.go
- rule_item_match.go
- rule_match_and.go
- rule_match_or.go
- workflow.go
Click to show internal directories.
Click to hide internal directories.