Categorygithub.com/hiank/think
modulepackage
0.0.0-20230303081844-6a5c134c44e7
Repository: https://github.com/hiank/think.git
Documentation: pkg.go.dev

# README

Think

Provide globally unique utilset

  • Fat: file coder for load bytes and decode config
  • TODO: base context for all utils
  • Nats: nats conn
  • DBS: KvDB set. contains [Mem]/[Disk] database client

NOTE: do not use this package in think's child package

Set

  1. 提供部分资源的单例实现,如数据库客户端、消息中间件客户端等
  2. 暴露package one 中的单例实现
  3. Close,关闭后当前进程中Set将不再可用(无法重新初始化)

NOTE: package one设计上期望只在frame内部访问,如果项目中希望访问其中的资源,使用对应的Set暴露的api

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

Set utils set NOTE: it would panic without call 'Init' method to generate an unique object.
WithDB DB use for dial to database and cache in set cfg.Tag use for cache in set.
WithNatsUrl nats url NOTE: if url is "", natsconn will be nil.
WithTODO base Context the todo will cancel when Destroy.

# Constants

No description provided by the author

# Structs

No description provided by the author

# Type aliases

No description provided by the author