我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何有效地在go的中间件中共享数据?

How to share data in go‘s middlewares efficiently?

Known solutions:

  1. Global map[interface{}]interface{}, it need type assertion and mutex, it is not i want.

  2. Standard library: x/net/context, but I can not visit the golang.org(blocked by Great Firewall of China), can somebody provides some examples or articles? Thanks.

Could somebody tell me what other efficient solution?

近期文章

  • 通过SetDeadline()为TCP侦听器设置超时
  • 将渲染的电子邮件发送到SendGrid的最快方法
  • 去任意查询
  • Golang json / gob / xml中的序列化性能
  • 在go 1.4.2中使用net包编译静态链接的测试二进制代码
  • GOLang:提取XML问题
  • 数据无法保存在我的数据库中
  • Golang:基准基数树查找
  • 为什么Go build可执行文件在第三方库的osx 10.7或更低版​​本上不起作用?
  • Golang:计算两个字节数组之间的差异并修补数组
  • 带有Java客户端的golang服务器
  • 更新html页面而不重新加载golang
  • Go类型的代码生成/语法表示
  • 不了解mongoDB Update如何在Go中工作
  • 如何在httpRouter中使用timeouthandle
  • 解析片段并找到所有顶级定义
  • 将golang与mongodb结合使用时如何在不将坐标作为索引的情况下进行$ nearSphere搜索
  • 如何通过TCP从离子(phonegap)连接到服务器上的websocket?
  • 如何在Golang中使用Unmarshal从json文档中获取结构中的json字符串
  • 在Go中调用EnumServicesStatusEx,内存分配?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华