Help us shape the future of Go! Take the 2026 Go Developer Survey

bootstrap

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: BSD-3-Clause Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadStaticValues

func LoadStaticValues() (values *common.Values, err error)

LoadStaticValues 加载静态配置 默认配置路径 ./config/config.yml

func NewAPI

func NewAPI() (*api.API, error)

func UseDatabase

func UseDatabase(values *common.Values, client *mongo.Client) (db *mongo.Database)

UseDatabase 初始化数据库 配置文档 https://www.mongodb.com/docs/drivers/go/current/ https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo

func UseHertz

func UseHertz(values *common.Values) (h *server.Hertz, err error)

UseHertz 使用 Hertz 配置文档 https://www.cloudwego.io/zh/docs/hertz/reference/config

func UseJetStream

func UseJetStream(nc *nats.Conn) (nats.JetStreamContext, error)

UseJetStream 初始化流 说明 https://docs.nats.io/using-nats/developer/develop_jetstream

func UseNats

func UseNats(values *common.Values) (nc *nats.Conn, err error)

UseNats 初始化 Nats 配置文档 https://docs.nats.io/using-nats/developer SDK https://github.com/nats-io/nats.go

func UseRedis

func UseRedis(values *common.Values) (client *redis.Client, err error)

UseRedis 初始化 Redis 配置文档 https://github.com/go-redis/redis

func UseTransfer

func UseTransfer(values *common.Values, js nats.JetStreamContext) (*transfer.Transfer, error)

UseTransfer 初始日志传输 https://github.com/weplanx/transfer

Types

This section is empty.

Jump to

Keyboard shortcuts

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