metadata

package
v0.0.0-...-c693505 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultMetadataStoreFactory

type DefaultMetadataStoreFactory struct{}

DefaultMetadataStoreFactory 默认的元数据存储工厂

func (*DefaultMetadataStoreFactory) Create

func (f *DefaultMetadataStoreFactory) Create(config core.MetadataConfig, pipelineId string) (MetadataStore, error)

Create 根据配置类型创建对应的MetadataStore实例,pipelineId用于隔离不同流水线的数据

type HTTPMetadataStore

type HTTPMetadataStore struct {
	// contains filtered or unexported fields
}

HTTPMetadataStore HTTP 元数据存储

func NewHTTPMetadataStore

func NewHTTPMetadataStore(config core.MetadataConfig, pipelineId string) (*HTTPMetadataStore, error)

NewHTTPMetadataStore 创建基于HTTP的元数据存储

func (*HTTPMetadataStore) Close

func (s *HTTPMetadataStore) Close() error

Close 关闭存储

func (*HTTPMetadataStore) Delete

func (s *HTTPMetadataStore) Delete(ctx context.Context, key string) error

Delete 通过HTTP接口删除元数据

func (*HTTPMetadataStore) Get

func (s *HTTPMetadataStore) Get(ctx context.Context, key string) (string, error)

Get 从HTTP接口获取元数据

func (*HTTPMetadataStore) Set

func (s *HTTPMetadataStore) Set(ctx context.Context, key string, value string) error

Set 通过HTTP接口设置元数据

type InConfigMetadataStore

type InConfigMetadataStore struct {
	// contains filtered or unexported fields
}

InConfigMetadataStore 从配置中直接读取数据的元数据存储 线程安全,支持运行时写入提取的数据

func NewInConfigMetadataStore

func NewInConfigMetadataStore(config core.MetadataConfig) (*InConfigMetadataStore, error)

NewInConfigMetadataStore 创建基于配置的元数据存储

func (*InConfigMetadataStore) Close

func (s *InConfigMetadataStore) Close() error

Close 关闭存储

func (*InConfigMetadataStore) Delete

func (s *InConfigMetadataStore) Delete(ctx context.Context, key string) error

Delete 删除元数据

func (*InConfigMetadataStore) Get

Get 获取元数据值

func (*InConfigMetadataStore) GetAll

func (s *InConfigMetadataStore) GetAll() map[string]string

GetAll 获取所有元数据的副本

func (*InConfigMetadataStore) Keys

func (s *InConfigMetadataStore) Keys() []string

Keys 获取所有键

func (*InConfigMetadataStore) Set

func (s *InConfigMetadataStore) Set(ctx context.Context, key string, value string) error

Set 设置元数据值(支持运行时写入)

type MetadataStore

type MetadataStore interface {
	// Get 获取元数据值
	Get(ctx context.Context, key string) (string, error)
	// Set 设置元数据值
	Set(ctx context.Context, key string, value string) error
	// Delete 删除元数据
	Delete(ctx context.Context, key string) error
	// Close 关闭元数据存储连接
	Close() error
}

MetadataStore 元数据存储接口

type MetadataStoreFactory

type MetadataStoreFactory interface {
	// Create 根据配置创建MetadataStore实例,pipelineId用于隔离不同流水线的数据
	Create(config core.MetadataConfig, pipelineId string) (MetadataStore, error)
}

MetadataStoreFactory 元数据存储工厂接口,用于创建MetadataStore实例

func NewMetadataStoreFactory

func NewMetadataStoreFactory() MetadataStoreFactory

NewMetadataStoreFactory 创建默认的元数据存储工厂

type RedisMetadataStore

type RedisMetadataStore struct {
	// contains filtered or unexported fields
}

RedisMetadataStore Redis 元数据存储

func NewRedisMetadataStore

func NewRedisMetadataStore(config core.MetadataConfig, pipelineId string) (*RedisMetadataStore, error)

NewRedisMetadataStore 创建基于Redis的元数据存储

func (*RedisMetadataStore) Close

func (s *RedisMetadataStore) Close() error

Close 关闭Redis连接

func (*RedisMetadataStore) Delete

func (s *RedisMetadataStore) Delete(ctx context.Context, key string) error

Delete 删除Redis元数据

func (*RedisMetadataStore) Get

func (s *RedisMetadataStore) Get(ctx context.Context, key string) (string, error)

Get 从Redis获取元数据

func (*RedisMetadataStore) Set

func (s *RedisMetadataStore) Set(ctx context.Context, key string, value string) error

Set 设置Redis元数据

Jump to

Keyboard shortcuts

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