百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

go-sync

> 编程语言
开源

Brave 同步服务器 v2

356 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Brave 同步服务器 v2

Brave Sync Server v2

A sync server implemented in go to communicate with Brave sync clients using components/sync/protocol/sync.proto. Current Chromium version for sync protocol buffer files used in this repo is Chromium 116.0.5845.183.

This server supports endpoints as bellow.

  • The POST /v2/command/ endpoint handles Commit and GetUpdates requests from sync clients and return corresponding responses both in protobuf format. Detailed of requests and their corresponding responses are defined in schema/protobuf/sync_pb/sync.proto. Sync clients are responsible for generating valid access tokens and present them to the server in the Authorization header of requests.

Currently we use dynamoDB as the datastore, the schema could be found in schema/dynamodb/table.json.

Developer Setup

  1. Install Go 1.22
  2. Install GolangCI-Lint
  3. Install gowrap
  4. Clone this repo
  5. Install protobuf protocol compiler if you need to compile protobuf files, which could be built using make protobuf.
  6. Build via make

Local development using Docker and DynamoDB Local

  1. Clone this repo
  2. Run make docker
  3. Run make docker-up
  4. To connect to your local server from a Brave browser client use --sync-url="http://localhost:8295/v2"
  5. For running unit tests, run make docker-test

Updating protocol definitions

  1. Copy the .proto files from components/sync/protocol in chromium to schema/protobuf/sync_pb in go-sync.
  2. Copy the .proto files from components/sync/protocol in brave-core to schema/protobuf/sync_pb in go-sync.
  3. Run make repath-proto to set correct import paths in .proto files.
  4. Run make proto-go-module to add the go_module option to .proto files.
  5. Run make protobuf to generate the Go code from .proto definitions.

Prometheus Instrumentation

The instrumented datastore and redis interfaces are generated, providing integration with Prometheus. The following will re-generate the instrumented code, required when updating protocl definitions:

make instrumented

Changes to datastore/datastore.go or cache/cache.go should be followed with the above command.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Go

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言