Skip to content

mukappalambda/my-trader

Repository files navigation

My Trader

A simple program written in Go to monitor data

::::    :::: :::   :::            ::::::::::::::::::::     :::    ::::::::: :::::::::::::::::::  
+:+:+: :+:+:+:+:   :+:                :+:    :+:    :+:  :+: :+:  :+:    :+::+:       :+:    :+: 
+:+ +:+:+ +:+ +:+ +:+                 +:+    +:+    +:+ +:+   +:+ +:+    +:++:+       +:+    +:+ 
+#+  +:+  +#+  +#++:  +#++:++#++:++   +#+    +#++:++#: +#++:++#++:+#+    +:++#++:++#  +#++:++#:  
+#+       +#+   +#+                   +#+    +#+    +#++#+     +#++#+    +#++#+       +#+    +#+ 
#+#       #+#   #+#                   #+#    #+#    #+##+#     #+##+#    #+##+#       #+#    #+# 
###       ###   ###                   ###    ###    ######     ############ #############    ### 

Quick Start

git clone https://github.com/mukappalambda/my-trader.git
cd my-trader

Build from source

make build
## spin up the database container
bash scripts/run.sh

## run grpc server
export DATABASE_URL=postgresql://postgres:password@localhost:5432/demo?sslmode=disable
./my-trader-server

## run my-trader-cli
./my-trader-cli send -t 'my-topic' -m 'my-message'

You can also use grpcurl to interact with the server.

List the available services

grpcurl -plaintext localhost:50051 list

Example output:

grpc.health.v1.Health
grpc.reflection.v1.ServerReflection
grpc.reflection.v1alpha.ServerReflection
message.MessageService

List a service's methods

grpcurl -plaintext localhost:50051 list grpc.health.v1.Health

Example output:

grpc.health.v1.Health.Check
grpc.health.v1.Health.Watch

Make a grpc request

grpcurl -plaintext localhost:50051 grpc.health.v1.Health/Check

Example output:

{
  "status": "SERVING"
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published