Skip to main content

TrB proto

Контракты сервисов и сгенерированный код:

  • Go — gen/go
  • JavaScript / TypeScript (protobuf + gRPC-Web) — npm-пакет @marleena/trb-proto
  • Python (protobuf + gRPC) — PyPI-пакет trb-proto

Генерация

Нужны protoc и плагины: protoc-gen-go, protoc-gen-go-grpc, protoc-gen-grpc-gateway, protoc-gen-js, protoc-gen-grpc-web.

make gene

Собирает Go, JS/TS и descriptor set. Google API-аннотации для JS генерируются отдельно, чтобы не попасть в gen/go.

Другие цели: make desc, make buf.

npm

npm install @marleena/trb-proto
import { MessageRequest } from '@marleena/trb-proto/example/Example_pb';
import { exampleClient } from '@marleena/trb-proto/example/ExampleServiceClientPb';

const client = new exampleClient('https://api.example.com');
const req = new MessageRequest();
req.setText('hello');

Python

pip install trb-proto
from indicators import indicators_pb2 as pb
from indicators import indicators_pb2_grpc

stub = indicators_pb2_grpc.IndicatorsStub(channel)
stub.ListSupported(pb.ListSupportedRequest())

Сервисы:

Внешние контракты в api/: api/tinvest.

Свои сервисы: clickhouse, nats, postgresql, test.

clickhouse — два proto: admin.proto (trb.clickhouse.v1.ClickHouse_Admin) и clickhouse.proto (trb.clickhouse.v1.ClickHouse).

postgresql — два proto: admin.proto (trb.postgresql.v1.PostgreSQL_Admin) и postgresql.proto (trb.postgresql.v1.PostgreSQL).

postgresql (trb.postgresql.v1.PostgreSQL) — цели планировщика: ListSchedulerTargets, SyncSchedulerTargets.

PostgreSQL_Admin — DDL, мониторинг и произвольные запросы: базы, схемы, таблицы, колонки, индексы, VACUUM/ANALYZE, процессы, блокировки.

nats (trb.nats.v1.Nats) — управление JetStream.

test (trb.test.v1.Test) — тестовый оркестратор.

CI/CD

Release на коммит v1.2.3 в main: npm (если версии ещё нет), PyPI trb-proto и POST /fetch/... на pkg.go.dev.

Trusted Publisher: npm — GitHub Mar1eena / TrB_proto / release.yml; PyPI — Pending publisher для trb-proto:

Поле Значение
PyPI project name trb-proto
Owner Mar1eena
Repository TrB_proto
Workflow name release.yml
Environment name (оставить пустым)

Pending publisher нужен до первого make rel, если проекта trb-proto на PyPI ещё нет.

Релиз

make rel

Собирает proto, поднимает patch-версию, коммитит все изменения с сообщением v1.2.3 и пушит в main. Actions публикует npm и обновляет pkg.go.dev.

Другой шаг версии: make rel PART=minor или PART=major.

Для коммита нужны user.name и user.email в Git.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trb_proto-1.0.37.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trb_proto-1.0.37-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file trb_proto-1.0.37.tar.gz.

File metadata

  • Download URL: trb_proto-1.0.37.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for trb_proto-1.0.37.tar.gz
Algorithm Hash digest
SHA256 59a4ec1bec11dae0dcb58703a3fc7b997f785ae4ed43ef9680738792873c8003
MD5 4a1d45137e7dbccaa3013c362ed10a4b
BLAKE2b-256 01c10e72726fe68e6cacd47556ea0c5b38bf54323f09bedb9762450449f92536

See more details on using hashes here.

Provenance

The following attestation bundles were made for trb_proto-1.0.37.tar.gz:

Publisher: release.yml on Mar1eena/TrB_proto

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file trb_proto-1.0.37-py3-none-any.whl.

File metadata

  • Download URL: trb_proto-1.0.37-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for trb_proto-1.0.37-py3-none-any.whl
Algorithm Hash digest
SHA256 fa1d58aecfc1e839c66fa9ade1cd49063f9d4cb4a58d063cfc28c5364bf23e19
MD5 29036b0f04ff6a04b0e3d266e9947bd1
BLAKE2b-256 f2bf57d67b34602bd8b8f59db817e355ddd3bfc730c994ef0f86ba9b9941e22d

See more details on using hashes here.

Provenance

The following attestation bundles were made for trb_proto-1.0.37-py3-none-any.whl:

Publisher: release.yml on Mar1eena/TrB_proto

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.0.44

2 files

1.0.43

2 files

1.0.42

2 files

1.0.41

2 files

1.0.40

2 files

1.0.39

2 files

1.0.38

2 files

This release

1.0.37 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page