bladego

module
v0.0.0-...-680e691 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: Apache-2.0

README

bladego

简介

bladego是一套完整的微服务开发框架,它的很多模块都参考了go-micro,但实现上又有所不同,这里更强调高性能,易扩展,易集成

设计准则

  • 高性能
    • 类似netty,异步网络接口,提供gpc(goroutine per connection)和nio两种传输模型,基于链表的buffer管理
  • 易扩展
    • 基于接口的设计方便扩展
  • 易上手
    • 每个模块都会有一个默认实现,便于开发调试,但并非最优实现
  • 弱依赖
    • 原则上尽量只依赖标准库,对于一些小的第三方库,直接集成在代码中,比较庞大的第三方库尽量放到plugin中实现

核心模块

使用场景

示例代码

集成或参考的第三方库

Directories

Path Synopsis
lru
database
mock
https://github.com/golang/mock
https://github.com/golang/mock
metadata
Package metadata is a way of defining message headers
Package metadata is a way of defining message headers
pkg
cast
Package cast provides easy and safe casting in Go.
Package cast provides easy and safe casting in Go.
singleflight
Package singleflight provides a duplicate function call suppression mechanism.
Package singleflight provides a duplicate function call suppression mechanism.
xid
Package xid is a globally unique id generator suited for web scale Xid is using Mongo Object ID algorithm to generate globally unique ids: https://docs.mongodb.org/manual/reference/object-id/ - 4-byte value representing the seconds since the Unix epoch, - 3-byte machine identifier, - 2-byte process id, and - 3-byte counter, starting with a random value.
Package xid is a globally unique id generator suited for web scale Xid is using Mongo Object ID algorithm to generate globally unique ids: https://docs.mongodb.org/manual/reference/object-id/ - 4-byte value representing the seconds since the Unix epoch, - 3-byte machine identifier, - 2-byte process id, and - 3-byte counter, starting with a random value.
sync
zdemo

Jump to

Keyboard shortcuts

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