Skip to content
/ agollo Public
forked from nosixtools/agollo

golang client for ctrip apollo ๐Ÿš€

License

Notifications You must be signed in to change notification settings

lrc0/agollo

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

110 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

agollo is a golang client for apollo ๐Ÿš€ CircleCI

Go Report Card codebeat badge Coverage Status golang GoDoc GitHub release

Simple chinese

็ฎ€ไฝ“ไธญๆ–‡

Feature

  • Multiple namespace support
  • Fail tolerant
  • Zero dependency

Required

go 1.9 or later

Installation

    go get -u github.com/philchia/agollo

Usage

Start use default app.properties config file

    agollo.Start()

Start use given config file path

    agollo.StartWithConfFile(name)

Subscribe to updates

    events := agollo.WatchUpdate()
    changeEvent := <-event
    bytes, _ := json.Marshal(changeEvent)
    fmt.Println("event:", string(bytes))

Get apollo values

    agollo.GetStringValue(Key, defaultValue)
    agollo.GetStringValueWithNameSapce(namespace, key, defaultValue)

Get namespace file contents

    agollo.GetNameSpaceContent(namespace, defaultValue)

License

agollo is released under MIT lecense

About

golang client for ctrip apollo ๐Ÿš€

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%