🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

github.com/xiaojiaoyu100/aliyun-acm

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/xiaojiaoyu100/aliyun-acm

v2.1.5+incompatible
Source
Go
Version published
Created
Source

aliyun-acm

aliyun-acm是对阿里云应用配置管理的封装

Usage

package main

import (
	"fmt"
	"github.com/xiaojiaoyu100/aliyun-acm"
)


func Handle(config aliacm.Config)  {
	fmt.Println(string(config.Content))
}

func main() {
	d, err := aliacm.New(
		"your_addr",
		"your_tenant",
		"your_access_key",
		"your_secret_key")
	if err != nil {
		return
	}
	var f = func(h aliacm.Unit, err error) {
		fmt.Println(err)
	}
	d.SetHook(f)
	unit := aliacm.Unit{
		Group: "your_group",
		DataID: "your_data_id",
		FetchOnce: true, // 有且仅拉取一次
		OnChange: Handle,
	}
	d.Add(unit)
	select{}
}

FAQs

Package last updated on 25 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts