apollo

package module
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 7 Imported by: 0

README

gcfg adapter for apollo

Package apollo implements GoFrame gcfg.Adapter using apollo service.

Import boot package in top of main

import _ "github.com/CharLemAznable/gfx/ext/gcfg/apollo/boot"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadAdapter

func LoadAdapter(ctx context.Context) (gcfg.Adapter, error)

Types

type AdapterApollo

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

func NewAdapterApollo

func NewAdapterApollo(ctx context.Context) (adapter *AdapterApollo, err error)

func (*AdapterApollo) Available

func (a *AdapterApollo) Available(_ context.Context, _ ...string) bool

func (*AdapterApollo) Data

func (a *AdapterApollo) Data(_ context.Context) (data map[string]interface{}, err error)

func (*AdapterApollo) Get

func (a *AdapterApollo) Get(_ context.Context, pattern string) (value interface{}, err error)

func (*AdapterApollo) OnChange

func (a *AdapterApollo) OnChange(event *agollox.ChangeEvent)

type Config

type Config struct {
	Key   string `json:"key"`
	Watch bool   `json:"watch"`
}

func LoadConfig added in v0.3.5

func LoadConfig(ctx context.Context) (*Config, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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