Skip to content

Instantly share code, notes, and snippets.

View reetasingh's full-sized avatar
👩‍💻
PR in progress ¯\_(ツ)_/¯

Reeta Singh reetasingh

👩‍💻
PR in progress ¯\_(ツ)_/¯
View GitHub Profile
func CreatePersonDB(persondbtype string, person Person) error {
var db PersonDB
if persondbtype == "local" {
db = new(LocalDatabase)
} else if persondbtype == "in-memory" {
db = new(InMemoryDatabase)
} else {
return fmt.Errorf("persondbtype not supported :%s", persondbtype)
}
db.save(person)
@reetasingh
reetasingh / envoy_http_dynamic_forward_proxy.yaml
Created March 22, 2021 20:13
Envoy to operate as an HTTP dynamic forward proxy
admin:
access_log_path: /tmp/admin_access.log
address:
socket_address:
address: 127.0.0.1
protocol: TCP
port_value: 9901
static_resources:
listeners:
- name: listener_0
@reetasingh
reetasingh / envoy_config_for_routing_using_request_header.yaml
Last active March 10, 2023 15:23
envoy - routing request to cluster based on the value of request header
static_resources:
listeners:
- name: listener_0
address:
socket_address:
address: 0.0.0.0
port_value: 10000
filter_chains:
- filters:
@reetasingh
reetasingh / Python-Makefile
Last active January 4, 2021 20:13
Makefile for python3 project.
# change <repo> with name of your actual repo
test: # run make setup before this
@echo *************Running tests*************; \
source .venv/bin/activate; \
pytest --junitxml htmlcov/codecov-results.xml --cov . --cov-config test/.coveragerc --cov-report html --cov-report xml
lint: # run make setup before this
@echo *************Running lint*************; \
source .venv/bin/activate; \
pylint <repo>/