governor

package
v0.0.0-...-26e1b9e Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README

Governor模块

Governor模块提供应用内的CPU,gorotine,栈上内存,内存分配等信息,以及包括了prometheus提供的内置的golang应用的采样器。

使用示例:

import (
	"gitee.com/peyton1991/kuat/auth"
	"gitee.com/peyton1991/kuat/cache/redis"
	"gitee.com/peyton1991/kuat/database/gorm"
	"gitee.com/peyton1991/kuat/governor"
	"gitee.com/peyton1991/kuat/log"
)


func Init() (err error) {
	...
	// step2:初始化服务治理组件:Governor服务治理
	if err = initGovernor(); err != nil {
		return
	}
	log.Info("step2:初始化服务治理组件:Governor服务治理")
	...
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(config *Config)

Types

type Config

type Config struct {
	Address string `json:"address" yaml:"address"` //服务治理地址
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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