remote

package
v0.0.0-...-a08c4ad Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApolloSource

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

ApolloSource loads and watches a namespace in Apollo.

func NewApolloSource

func NewApolloSource(appID, cluster, namespaceName, metaAddr string, p parser.Parser) (*ApolloSource, error)

NewApolloSource creates an ApolloSource.

  • appID: Apollo AppId
  • cluster: cluster name (usually "default")
  • namespaceName: namespace to watch (e.g., "config", "myapp.yaml")
  • metaAddr: Apollo Meta Server address (e.g., "http://localhost:8080")
  • p: parser matching the config format stored in the namespace (usually JSON/YAML)

func (*ApolloSource) Load

func (as *ApolloSource) Load(ctx context.Context) (map[string]interface{}, error)

func (*ApolloSource) Name

func (as *ApolloSource) Name() string

func (*ApolloSource) Watch

func (as *ApolloSource) Watch(ctx context.Context, onChange func(map[string]interface{})) error

type ConsulSource

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

ConsulSource loads and watches a key in Consul KV.

func NewConsulSource

func NewConsulSource(addr, key string, p parser.Parser) (*ConsulSource, error)

NewConsulSource creates a ConsulSource.

  • addr: Consul agent address (e.g., "127.0.0.1:8500")
  • key: KV path (e.g., "config/myapp.yaml")
  • p: parser matching the value format stored in Consul

func (*ConsulSource) Load

func (cs *ConsulSource) Load(ctx context.Context) (map[string]interface{}, error)

func (*ConsulSource) Name

func (cs *ConsulSource) Name() string

func (*ConsulSource) Watch

func (cs *ConsulSource) Watch(ctx context.Context, onChange func(map[string]interface{})) error

type EtcdSource

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

EtcdSource loads and watches a key in etcd.

func NewEtcdSource

func NewEtcdSource(endpoints []string, key string, p parser.Parser) (*EtcdSource, error)

NewEtcdSource creates a new EtcdSource. The parser must match the value format.

func (*EtcdSource) Load

func (es *EtcdSource) Load(ctx context.Context) (map[string]interface{}, error)

func (*EtcdSource) Name

func (es *EtcdSource) Name() string

func (*EtcdSource) Watch

func (es *EtcdSource) Watch(ctx context.Context, onChange func(map[string]interface{})) error

type NacosSource

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

NacosSource loads and watches a configuration from Nacos.

func NewNacosSource

func NewNacosSource(serverAddr, namespaceID, dataID, group string, p parser.Parser) (*NacosSource, error)

NewNacosSource creates a NacosSource. The parser must match the config format (e.g. YAML).

func (*NacosSource) Load

func (ns *NacosSource) Load(ctx context.Context) (map[string]interface{}, error)

func (*NacosSource) Name

func (ns *NacosSource) Name() string

func (*NacosSource) Watch

func (ns *NacosSource) Watch(ctx context.Context, onChange func(map[string]interface{})) error

Jump to

Keyboard shortcuts

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