All Projects → philchia → agollo

philchia / agollo

Licence: MIT License
agollo is a golang client for ctrip apollo config center 🚀

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to agollo

udacity-alumni-fe
A front-end web application and bespoke publishing platform, built by Udacity Alumni for Udacity Alumni
Stars: ✭ 45 (-67.86%)
Mutual labels:  apollo
apollo-error-converter
Global Apollo Server Error handling made easy. Remove verbose and repetitive resolver / data source Error handling. Automatic Error catching, logging, and conversion to ApolloErrors.
Stars: ✭ 16 (-88.57%)
Mutual labels:  apollo
graphql-ruby-persisted queries
Persisted queries for graphql-ruby
Stars: ✭ 119 (-15%)
Mutual labels:  apollo
apollo-chat-graphql-server
Apollo Chat is a Chat Service build on GraphQL Apollo with Subscriptions
Stars: ✭ 13 (-90.71%)
Mutual labels:  apollo
netlify-faunadb-graphql-auth
Netlify functions example with faunadb, graphql, and authorization
Stars: ✭ 57 (-59.29%)
Mutual labels:  apollo
now-course
Proyecto para el curso de Now.sh en Platzi
Stars: ✭ 19 (-86.43%)
Mutual labels:  apollo
apollo-rs
Spec compliant GraphQL Tools in Rust.
Stars: ✭ 314 (+124.29%)
Mutual labels:  apollo
next-ts-graphql-apollo-starter
An opiniated Next powered starter which include support for Apollo with GraphQL SSR support, codegen, styled component / system, framer motion and Cypress
Stars: ✭ 18 (-87.14%)
Mutual labels:  apollo
bs-graphql-bindings
BuckleScript binding for graphql-js
Stars: ✭ 50 (-64.29%)
Mutual labels:  apollo
auth-flow-react-apollo-saga
Full stack login/register flow with React, Apollo, Redux, Redux-saga and MongoDB.
Stars: ✭ 22 (-84.29%)
Mutual labels:  apollo
Ocelot-Social
Free and open-source social network for active citizenship.
Stars: ✭ 49 (-65%)
Mutual labels:  apollo
rn-chat
Chat app made with React Native, NativeBase, Apollo Hooks and Sequelize.
Stars: ✭ 37 (-73.57%)
Mutual labels:  apollo
native-app
🍿 🕐 🎞 React Native App for the PCT environment
Stars: ✭ 39 (-72.14%)
Mutual labels:  apollo
cadhub
We're out to raise awareness and put CodeCAD on the map. The success of CadHub can be measured by the amount it promotes the use of CodeCAD within the mechanical/manufacturing industry and the strength the CadHub community.
Stars: ✭ 204 (+45.71%)
Mutual labels:  apollo
basil
An experimental Magento 2 theme
Stars: ✭ 18 (-87.14%)
Mutual labels:  apollo
fittrak
A data-driven workout tracking tool for the quantified-self 💪 🤓
Stars: ✭ 19 (-86.43%)
Mutual labels:  apollo
RxApollo
RxSwift extensions for Apollo
Stars: ✭ 57 (-59.29%)
Mutual labels:  apollo
apollo-progressive-fragment-matcher
A smart alternative to the introspection fragment matcher.
Stars: ✭ 21 (-85%)
Mutual labels:  apollo
graphql-workshop
Hands on workshop about GraphQL with React and Apollo 🚀
Stars: ✭ 43 (-69.29%)
Mutual labels:  apollo
blog-frontend
Frontend of blog created using: GraphQL (Apollo) + Vue + Nuxt.js + TypeScript + Vuetify...
Stars: ✭ 43 (-69.29%)
Mutual labels:  apollo

agollo is a golang client for apollo 🚀 CircleCI

Go Report Card codebeat badge Coverage Status golang GoDoc GitHub release

v1:goproxy.cn v3:goproxy.cn v4:goproxy.cn

Feature

  • Multiple namespace support
  • Fail tolerant
  • Zero dependency
  • Realtime change notification
  • API to get contents of namespace

Required

go 1.11 or later

Installation

go get -u github.com/philchia/agollo/v4

Usage

Import agollo

import "github.com/philchia/agollo/v4"

In order to use agollo, issue a client or use the built-in default client

to use the default global client

for namespaces with the format of properties, you need to specific the full name

agollo.Start(&agollo.Conf{
    AppID:          "your app id",
    Cluster:        "default",
    NameSpaceNames: []string{"application.properties"},
    MetaAddr:       "your apollo meta addr",
})

or to issue a new client to embedded into your program

apollo := agollo.New(&agollo.Conf{
                            AppID:          "your app id",
                            Cluster:        "default",
                            NameSpaceNames: []string{"application.properties"},
                            MetaAddr:       "your apollo meta addr",
                        })
apollo.Start()

Set config update callback

agollo.OnUpdate(func(event *ChangeEvent) {
    // do your business logic to handle config update
})

Get apollo values

// get values in the application.properties default namespace
val := agollo.GetString(Key)
// or indicate a namespace
other := agollo.GetString(key, agollo.WithNamespace("other namespace"))

Get namespace file contents

to get namespace of with a format of properties, you need to specific the full name of the namespace, e.g. namespace.properties in both options and configs

namespaceContent := agollo.GetContent(agollo.WithNamespace("application.properties"))

Get all keys

allKyes := agollo.GetAllKeys(namespace)

Subscribe to new namespaces

agollo.SubscribeToNamespaces("newNamespace1", "newNamespace2")

License

agollo is released under MIT license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].