bootstrap

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func LoadStaticValues added in v1.5.0

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

LoadStaticValues 加载静态配置

func NewApp added in v1.3.0

func NewApp() (*app.App, error)

func UseDatabase added in v1.5.0

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 UseJetStream

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

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

func UseKeyValue added in v1.5.0

func UseKeyValue(values *common.Values, js nats.JetStreamContext) (nats.KeyValue, error)

UseKeyValue 初始分布配置 说明 https://docs.nats.io/using-nats/developer/develop_jetstream/kv

func UseMongoDB added in v1.5.0

func UseMongoDB(values *common.Values) (*mongo.Client, error)

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

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 UseZap

func UseZap() (log *zap.Logger, err error)

UseZap 初始日志 说明 https://pkg.go.dev/go.uber.org/zap

Types

This section is empty.

Jump to

Keyboard shortcuts

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