apollo

package
v0.13.10 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigCenter = &Apollo{}

Functions

This section is empty.

Types

type Apollo

type Apollo struct {
	Conf   Config
	Client agollo.Client
}

func (*Apollo) Close

func (cc *Apollo) Close() error

func (*Apollo) Config

func (cc *Apollo) Config() any

func (*Apollo) Handle

func (e *Apollo) Handle(ctx context.Context, merge func(io.Reader) error, onChange func(io.Reader) error) error

TODD: 更改监听

func (*Apollo) Type

func (e *Apollo) Type() string

type Config added in v0.13.10

type Config struct {
	config.AppConfig
	Namespaces []string
}

type CustomListener added in v0.13.10

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

1. 定义你的监听器结构体

func (*CustomListener) OnChange added in v0.13.10

func (l *CustomListener) OnChange(event *storage.ChangeEvent)

2. 实现 OnChange 方法

func (*CustomListener) OnNewestChange added in v0.13.10

func (l *CustomListener) OnNewestChange(event *storage.FullChangeEvent)

3. 实现 OnNewestChange 方法(通常留空或记录日志)

Jump to

Keyboard shortcuts

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