merge

package
v2.0.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalSchemaStore = &SchemaStore{}

Functions

func AddRuleSchema

func AddRuleSchema(ruleID, dataSource string, schema map[string]*ast.JsonStreamField, isWildcard bool)

func MergeSchema

func MergeSchema(originSchema, newSchema map[string]*ast.JsonStreamField) (map[string]*ast.JsonStreamField, error)

func RemoveRuleSchema

func RemoveRuleSchema(ruleID string)

Types

type RuleSchemaResponse

type RuleSchemaResponse struct {
	// streamName -> schema
	Schema map[string]map[string]*ast.JsonStreamField `json:"schema"`
	// streamName -> wildcard
	Wildcard map[string]bool `json:"wildcard"`
}

func GetRuleSchema

func GetRuleSchema(ruleID string) RuleSchemaResponse

type SchemaStore

type SchemaStore struct {
	sync.RWMutex
	// rule -> datasource -> schema
	SchemaMap map[string]map[string]map[string]*ast.JsonStreamField
	// rule -> datasource -> schema
	WildcardMap map[string]map[string]bool
}

Jump to

Keyboard shortcuts

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