esentinel

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const PackageName = "core.sentinel"

PackageName 设置包名

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
}

Component 组件

type Config

type Config struct {
	AppName       string `json:"appName"`       // 应用名,默认从ego框架内部获取
	LogPath       string `json:"logPath"`       // 日志路径,默认./logs
	FlowRulesFile string `json:"flowRulesFile"` // 限流配置路径
}

Config 配置

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns default config for sentinel

type Container

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

Container 容器

func DefaultContainer

func DefaultContainer() *Container

DefaultContainer 默认容器

func Load

func Load(key string) *Container

Load 加载配置key

func (*Container) Build

func (c *Container) Build(options ...Option)

Build 构建组件

type Option

type Option func(c *Container)

Option 可选项

Jump to

Keyboard shortcuts

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