MicroPlatfrom

module
v0.0.0-...-26b160e Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: Apache-2.0

README

Micro platform License GoDoc Travis CI Go Report Card [Go Help]

MicroPlatform is a platform library for micro services including app and db services.

NOTE: This is still a work in progress

Usage

Each package is backed by a Micro OS service. Packages can be used independently or with go-micro wrappers.

Features

Examples of usage can be found in go-os/examples

Package Built-in Plugin Description
auth auth-srv authentication and authorisation for users and services
config config-srv dynamic configuration which is namespaced and versioned
dbservice db-srv distributed database server
discovery discovery-srv extends the go-micro registry to add heartbeating, etc
event event-srv event publication, subscription and aggregation
kv distributed in-memory simply key value layered on memcached, etcd, consul
log file structured logging to stdout, logstash, fluentd, pubsub
monitor monitor-srv add custom healthchecks measured with distributed systems in mind
metrics telegraf instrumentation and collation of counters
router router-srv global circuit breaking, load balancing, A/B testing
sync consul distributed locking, leadership election, etc
trace trace-srv distributed tracing of request/response

Directories

Path Synopsis
src
auth
Package auth is an interface for authentication and authorization.
Package auth is an interface for authentication and authorization.
auth/proto
Package go_micro_os_auth is a generated protocol buffer package.
Package go_micro_os_auth is a generated protocol buffer package.
common/broker
@Time : 2019/6/5 16:28 @Author : kenny zhu @File : broker @Software: GoLand @Others: @Time : 2019/6/5 16:25 @Author : kenny zhu @File : options @Software: GoLand @Others:
@Time : 2019/6/5 16:28 @Author : kenny zhu @File : broker @Software: GoLand @Others: @Time : 2019/6/5 16:25 @Author : kenny zhu @File : options @Software: GoLand @Others:
common/log/log
@Time : 2018/8/16 12:46 @Author : kenny zhu @File : interface.go @Software: GoLand @Others: Default operations.
@Time : 2018/8/16 12:46 @Author : kenny zhu @File : interface.go @Software: GoLand @Others: Default operations.
common/log/log/proto
Package go_micro_os_log is a generated protocol buffer package.
Package go_micro_os_log is a generated protocol buffer package.
common/metrics
@Time : 2019/5/10 10:16 @Author : kenny zhu @File : options.go @Software: GoLand @Others: @Time : 2019/5/9 17:56 @Author : kenny zhu @File : prometheus.go @Software: GoLand @Others: gin prometheus process @Time : 2019/5/10 10:25 @Author : kenny zhu @File : prometheus_rabbitmq.go @Software: GoLand @Others: 参考 https://github.com/kbudde/rabbitmq_exporter 代码实现对整个rabbitmq监控。
@Time : 2019/5/10 10:16 @Author : kenny zhu @File : options.go @Software: GoLand @Others: @Time : 2019/5/9 17:56 @Author : kenny zhu @File : prometheus.go @Software: GoLand @Others: gin prometheus process @Time : 2019/5/10 10:25 @Author : kenny zhu @File : prometheus_rabbitmq.go @Software: GoLand @Others: 参考 https://github.com/kbudde/rabbitmq_exporter 代码实现对整个rabbitmq监控。
common/monitor
@Time : 2019/4/23 15:48 @Author : kenny zhu @File : common.go @Software: GoLand @Others: @Time : 2019/4/23 15:27 @Author : kenny zhu @File : monitor.go @Software: GoLand @Others: @Time : 2019/4/23 15:37 @Author : kenny zhu @File : options.go @Software: GoLand @Others: @Time : 2019/4/23 15:42 @Author : kenny zhu @File : os.go @Software: GoLand @Others:
@Time : 2019/4/23 15:48 @Author : kenny zhu @File : common.go @Software: GoLand @Others: @Time : 2019/4/23 15:27 @Author : kenny zhu @File : monitor.go @Software: GoLand @Others: @Time : 2019/4/23 15:37 @Author : kenny zhu @File : options.go @Software: GoLand @Others: @Time : 2019/4/23 15:42 @Author : kenny zhu @File : os.go @Software: GoLand @Others:
common/rabbitmq
@Time : 2019/4/28 11:06 @Author : kenny zhu @File : auth.go @Software: GoLand @Others: @Time : 2019/4/28 10:50 @Author : kenny zhu @File : channel.go @Software: GoLand @Others: @Time : 2019/4/28 10:52 @Author : kenny zhu @File : connection.go @Software: GoLand @Others: @Time : 2019/4/28 10:44 @Author : kenny zhu @File : context.go @Software: GoLand @Others: @Time : 2019/4/28 10:43 @Author : kenny zhu @File : options.go @Software: GoLand @Others: @Time : 2019/4/28 10:39 @Author : kenny zhu @File : rabbitmq.go @Software: GoLand @Others:
@Time : 2019/4/28 11:06 @Author : kenny zhu @File : auth.go @Software: GoLand @Others: @Time : 2019/4/28 10:50 @Author : kenny zhu @File : channel.go @Software: GoLand @Others: @Time : 2019/4/28 10:52 @Author : kenny zhu @File : connection.go @Software: GoLand @Others: @Time : 2019/4/28 10:44 @Author : kenny zhu @File : context.go @Software: GoLand @Others: @Time : 2019/4/28 10:43 @Author : kenny zhu @File : options.go @Software: GoLand @Others: @Time : 2019/4/28 10:39 @Author : kenny zhu @File : rabbitmq.go @Software: GoLand @Others:
common/rcache
@Time : 2019/6/21 10:22 @Author : kenny zhu @File : options @Software: GoLand @Others: @Time : 2019/6/21 10:22 @Author : kenny zhu @File : rcache @Software: GoLand @Others:
@Time : 2019/6/21 10:22 @Author : kenny zhu @File : options @Software: GoLand @Others: @Time : 2019/6/21 10:22 @Author : kenny zhu @File : rcache @Software: GoLand @Others:
common/registry
@Time : 2019/6/4 16:18 @Author : kenny zhu @File : interface @Software: GoLand @Others: Package etcdv3 provides an etcd version 3 registry @Time : 2019/6/4 16:41 @Author : kenny zhu @File : interface @Software: GoLand @Others: @Time : 2019/6/4 16:21 @Author : kenny zhu @File : options @Software: GoLand @Others: @Time : 2019/6/4 16:22 @Author : kenny zhu @File : registry @Software: GoLand @Others: @Time : 2019/6/4 16:43 @Author : kenny zhu @File : watcher @Software: GoLand @Others:
@Time : 2019/6/4 16:18 @Author : kenny zhu @File : interface @Software: GoLand @Others: Package etcdv3 provides an etcd version 3 registry @Time : 2019/6/4 16:41 @Author : kenny zhu @File : interface @Software: GoLand @Others: @Time : 2019/6/4 16:21 @Author : kenny zhu @File : options @Software: GoLand @Others: @Time : 2019/6/4 16:22 @Author : kenny zhu @File : registry @Software: GoLand @Others: @Time : 2019/6/4 16:43 @Author : kenny zhu @File : watcher @Software: GoLand @Others:
common/selector
@Time : 2019/6/19 14:17 @Author : kenny zhu @File : default @Software: GoLand @Others: @Time : 2019/6/19 14:22 @Author : kenny zhu @File : filter @Software: GoLand @Others: @Time : 2019/6/19 14:13 @Author : kenny zhu @File : options @Software: GoLand @Others: @Time : 2019/6/19 14:12 @Author : kenny zhu @File : selector @Software: GoLand @Others: @Time : 2019/6/19 14:15 @Author : kenny zhu @File : strategy @Software: GoLand @Others:
@Time : 2019/6/19 14:17 @Author : kenny zhu @File : default @Software: GoLand @Others: @Time : 2019/6/19 14:22 @Author : kenny zhu @File : filter @Software: GoLand @Others: @Time : 2019/6/19 14:13 @Author : kenny zhu @File : options @Software: GoLand @Others: @Time : 2019/6/19 14:12 @Author : kenny zhu @File : selector @Software: GoLand @Others: @Time : 2019/6/19 14:15 @Author : kenny zhu @File : strategy @Software: GoLand @Others:
common/service-wrapper
@Time : 2019/5/13 10:37 @Author : kenny zhu @File : options.go @Software: GoLand @Others: @Time : 2019/5/13 10:46 @Author : kenny zhu @File : service.go @Software: GoLand @Others: @Time : 2019/5/13 10:36 @Author : kenny zhu @File : wrapper.go @Software: GoLand @Others:
@Time : 2019/5/13 10:37 @Author : kenny zhu @File : options.go @Software: GoLand @Others: @Time : 2019/5/13 10:46 @Author : kenny zhu @File : service.go @Software: GoLand @Others: @Time : 2019/5/13 10:36 @Author : kenny zhu @File : wrapper.go @Software: GoLand @Others:
common/testModules
@Time : 2019/4/28 14:37 @Author : kenny zhu @File : test_broker.go @Software: GoLand @Others: @Time : 2019/6/10 12:00 @Author : kenny zhu @File : test_ping @Software: GoLand @Others: @Time : 2019/6/19 10:46 @Author : kenny zhu @File : test_readonly @Software: GoLand @Others: todo: 数据进一步控制: 身份验证:用 runtime.Caller 验证调用堆栈,仅允许指定函数调用。
@Time : 2019/4/28 14:37 @Author : kenny zhu @File : test_broker.go @Software: GoLand @Others: @Time : 2019/6/10 12:00 @Author : kenny zhu @File : test_ping @Software: GoLand @Others: @Time : 2019/6/19 10:46 @Author : kenny zhu @File : test_readonly @Software: GoLand @Others: todo: 数据进一步控制: 身份验证:用 runtime.Caller 验证调用堆栈,仅允许指定函数调用。
common/util/addr
@Time : 2019/5/13 11:00 @Author : kenny zhu @File : addr.go @Software: GoLand @Others:
@Time : 2019/5/13 11:00 @Author : kenny zhu @File : addr.go @Software: GoLand @Others:
common/util/debug
@Time : 2019/5/22 11:57 @Author : kenny zhu @File : debug @Software: GoLand @Others:
@Time : 2019/5/22 11:57 @Author : kenny zhu @File : debug @Software: GoLand @Others:
common/util/net
@Time : 2019/6/10 11:57 @Author : kenny zhu @File : ping @Software: GoLand @Others:
@Time : 2019/6/10 11:57 @Author : kenny zhu @File : ping @Software: GoLand @Others:
common/web
@Time : 2019/4/19 16:24 @Author : kenny zhu @File : options.go @Software: GoLand @Others: @Time : 2019/4/19 16:28 @Author : kenny zhu @File : roundShardTripper.go @Software: GoLand @Others: @Time : 2019/4/19 16:23 @Author : kenny zhu @File : web.go @Software: GoLand @Others:
@Time : 2019/4/19 16:24 @Author : kenny zhu @File : options.go @Software: GoLand @Others: @Time : 2019/4/19 16:28 @Author : kenny zhu @File : roundShardTripper.go @Software: GoLand @Others: @Time : 2019/4/19 16:23 @Author : kenny zhu @File : web.go @Software: GoLand @Others:
config
Package config is an interface for dynamic configuration.
Package config is an interface for dynamic configuration.
config/proto
Package go_micro_os_config is a generated protocol buffer package.
Package go_micro_os_config is a generated protocol buffer package.
dbservice/api/conf
@Time : 2018/8/21 11:32 @Author : kenny zhu @File : conf.go @Software: GoLand @Others: @Time : 2018/8/21 11:28 @Author : kenny zhu @File : json.go @Software: GoLand @Others:
@Time : 2018/8/21 11:32 @Author : kenny zhu @File : conf.go @Software: GoLand @Others: @Time : 2018/8/21 11:28 @Author : kenny zhu @File : json.go @Software: GoLand @Others:
dbservice/api/gin/modules
@Time : 2018/8/21 11:19 @Author : kenny zhu @File : examples.go @Software: GoLand @Others: @Time : 2018/8/21 11:04 @Author : kenny zhu @File : init.go @Software: GoLand @Others: @Time : 2018/8/21 11:05 @Author : kenny zhu @File : modules.go @Software: GoLand @Others:
@Time : 2018/8/21 11:19 @Author : kenny zhu @File : examples.go @Software: GoLand @Others: @Time : 2018/8/21 11:04 @Author : kenny zhu @File : init.go @Software: GoLand @Others: @Time : 2018/8/21 11:05 @Author : kenny zhu @File : modules.go @Software: GoLand @Others:
dbservice/api/iris
@Time : 2018/8/21 10:55 @Author : kenny zhu @File : iris.go @Software: GoLand @Others:
@Time : 2018/8/21 10:55 @Author : kenny zhu @File : iris.go @Software: GoLand @Others:
dbservice/api/iris/modules
@Time : 2018/8/21 11:19 @Author : kenny zhu @File : examples.go @Software: GoLand @Others: @Time : 2018/8/21 11:04 @Author : kenny zhu @File : init.go @Software: GoLand @Others: @Time : 2018/8/21 11:05 @Author : kenny zhu @File : modules.go @Software: GoLand @Others:
@Time : 2018/8/21 11:19 @Author : kenny zhu @File : examples.go @Software: GoLand @Others: @Time : 2018/8/21 11:04 @Author : kenny zhu @File : init.go @Software: GoLand @Others: @Time : 2018/8/21 11:05 @Author : kenny zhu @File : modules.go @Software: GoLand @Others:
dbservice/api/modules
@Time : 2018/8/21 11:19 @Author : kenny zhu @File : examples.go @Software: GoLand @Others: @Time : 2018/8/21 11:04 @Author : kenny zhu @File : init.go @Software: GoLand @Others: @Time : 2018/8/21 11:05 @Author : kenny zhu @File : modules.go @Software: GoLand @Others:
@Time : 2018/8/21 11:19 @Author : kenny zhu @File : examples.go @Software: GoLand @Others: @Time : 2018/8/21 11:04 @Author : kenny zhu @File : init.go @Software: GoLand @Others: @Time : 2018/8/21 11:05 @Author : kenny zhu @File : modules.go @Software: GoLand @Others:
dbservice/handler
Every handler runs in a goroutine.
Every handler runs in a goroutine.
dbservice/models
@Time : 2018/8/15 19:05 @Author : kenny zhu @File : base.go @Software: GoLand @Others: model base operation @refer:github.com/go-tango/wego/blob/master/models/base.go.
@Time : 2018/8/15 19:05 @Author : kenny zhu @File : base.go @Software: GoLand @Others: model base operation @refer:github.com/go-tango/wego/blob/master/models/base.go.
dbservice/models/maps
@Time : 2018/9/26 16:21 @Author : kenny zhu @File : sample_impl.go @Software: GoLand @Others: 此文件需要用proteus工具生成对应的micro server文件...
@Time : 2018/9/26 16:21 @Author : kenny zhu @File : sample_impl.go @Software: GoLand @Others: 此文件需要用proteus工具生成对应的micro server文件...
dbservice/proto/api
Package go_micro_api is a generated protocol buffer package.
Package go_micro_api is a generated protocol buffer package.
dbservice/proto/example
Package go_micro_srv_dbservice is a generated protocol buffer package.
Package go_micro_srv_dbservice is a generated protocol buffer package.
dbservice/proto/usercenter
Package models is a generated protocol buffer package.
Package models is a generated protocol buffer package.
dbservice/redis
@Time : 2018/9/4 12:41 @Author : kenny zhu @File : base.go @Software: GoLand @Others: https://godoc.org/github.com/gomodule/redigo/redis#pkg-examples
@Time : 2018/9/4 12:41 @Author : kenny zhu @File : base.go @Software: GoLand @Others: https://godoc.org/github.com/gomodule/redigo/redis#pkg-examples
dbservice/router
@Time : 2018/8/24 14:22 @Author : kenny zhu @File : selector_byid.go @Software: GoLand @Others: Implements multi-database for route services...
@Time : 2018/8/24 14:22 @Author : kenny zhu @File : selector_byid.go @Software: GoLand @Others: Implements multi-database for route services...
dbservice/tools/example
Package example is a generated protocol buffer package.
Package example is a generated protocol buffer package.
dbservice/tools/example/cli
@Time : 2018/10/10 16:41 @Author : kenny zhu @File : main.go @Software: GoLand @Others:
@Time : 2018/10/10 16:41 @Author : kenny zhu @File : main.go @Software: GoLand @Others:
discovery
@Time : 2018/8/27 20:16 @Author : kenny zhu @File : common.go @Software: GoLand @Others: Package discovery is an interface for scalable service discovery.
@Time : 2018/8/27 20:16 @Author : kenny zhu @File : common.go @Software: GoLand @Others: Package discovery is an interface for scalable service discovery.
event
Package event is an interface for event sourcing.
Package event is an interface for event sourcing.
event/proto
Package go_micro_os_event is a generated protocol buffer package.
Package go_micro_os_event is a generated protocol buffer package.
gateservice/conf
@Time : 2018/8/21 11:32 @Author : kenny zhu @File : conf.go @Software: GoLand @Others: @Time : 2018/8/21 11:28 @Author : kenny zhu @File : json.go @Software: GoLand @Others:
@Time : 2018/8/21 11:32 @Author : kenny zhu @File : conf.go @Software: GoLand @Others: @Time : 2018/8/21 11:28 @Author : kenny zhu @File : json.go @Software: GoLand @Others:
gateservice/iris
@Time : 2018/8/21 10:55 @Author : kenny zhu @File : iris.go @Software: GoLand @Others:
@Time : 2018/8/21 10:55 @Author : kenny zhu @File : iris.go @Software: GoLand @Others:
gateservice/iris/modules
@Time : 2018/8/21 11:19 @Author : kenny zhu @File : examples.go @Software: GoLand @Others: @Time : 2018/8/21 11:04 @Author : kenny zhu @File : init.go @Software: GoLand @Others: @Time : 2018/8/21 11:05 @Author : kenny zhu @File : modules.go @Software: GoLand @Others:
@Time : 2018/8/21 11:19 @Author : kenny zhu @File : examples.go @Software: GoLand @Others: @Time : 2018/8/21 11:04 @Author : kenny zhu @File : init.go @Software: GoLand @Others: @Time : 2018/8/21 11:05 @Author : kenny zhu @File : modules.go @Software: GoLand @Others:
kv
Package kv is an interface for key-value storage.
Package kv is an interface for key-value storage.
kv/proto
Package go_micro_os_kv is a generated protocol buffer package.
Package go_micro_os_kv is a generated protocol buffer package.
log
@Time : 2018/8/16 12:46 @Author : kenny zhu @File : interface.go @Software: GoLand @Others: Package log is an interface for structured logging.
@Time : 2018/8/16 12:46 @Author : kenny zhu @File : interface.go @Software: GoLand @Others: Package log is an interface for structured logging.
log/proto
Package go_micro_os_log is a generated protocol buffer package.
Package go_micro_os_log is a generated protocol buffer package.
metrics
Package metrics is an interface for instrumentation.
Package metrics is an interface for instrumentation.
monitor
Package monitor is an interface for monitoring.
Package monitor is an interface for monitoring.
monitor/proto
Package go_micro_os_monitor is a generated protocol buffer package.
Package go_micro_os_monitor is a generated protocol buffer package.
monitor/web
Package web is a web dashboard
Package web is a web dashboard
router
common route for subscribe and publish Package router is an interface for global service routing.
common route for subscribe and publish Package router is an interface for global service routing.
router/proto
Package go_micro_os_router is a generated protocol buffer package.
Package go_micro_os_router is a generated protocol buffer package.
sync
Package sync is an interface for synchronization.
Package sync is an interface for synchronization.
testclients/dbservice/api
@Time : 2018/8/28 15:23 @Author : kenny zhu @File : iris_api.go @Software: GoLand @Others:
@Time : 2018/8/28 15:23 @Author : kenny zhu @File : iris_api.go @Software: GoLand @Others:
tools/proteus
Proteus /proʊtiəs/ is a tool to generate protocol buffers version 3 compatible `.proto` files from your Go structs, types and functions.
Proteus /proʊtiəs/ is a tool to generate protocol buffers version 3 compatible `.proto` files from your Go structs, types and functions.
tools/proteus/example
Package example is a generated protocol buffer package.
Package example is a generated protocol buffer package.
tools/proteus/example/categories
Package categories is a generated protocol buffer package.
Package categories is a generated protocol buffer package.
tools/proteus/rpc
@Time : 2018/10/12 10:58 @Author : kenny zhu @File : micro_rpc.go @Software: GoLand @Others:
@Time : 2018/10/12 10:58 @Author : kenny zhu @File : micro_rpc.go @Software: GoLand @Others:
trace
Package trace is an interface for tracing.
Package trace is an interface for tracing.
trace/proto
Package go_micro_os_trace is a generated protocol buffer package.
Package go_micro_os_trace is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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