Demonstrate a bounded context distributed over multiple repositories. In `go`

Contextive Demo - Go - Service

This repository illustrates the use of Contextive in an environment where multiple repositories are part of the same bounded context and need access to the same set of definitions.

In this pattern, the definitions are contained within a common repository - e.g. https://github.com/dev-cycles/contextive-demo-go-common

Native package management and distribution techniques are leveraged to ensure the definitions are available to your IDE while working on the service repo.

How does it work?

  1. Add your definitions file to a 'shared' repository for the bounded context - something which stores any common context-wide code, such as entities, contexts, constants etc.
    1. In this demo, it's contextive-demo-go-common
  2. Ensure the definitions file is included in the distributed package.
    1. For go this is as simple as having it in the repository
  3. Depend on the common package using standard package techniques.
    1. In this case go get.
    2. See go.mod for the reference to contextive-demo-go-common
  4. Set the contextive.path setting in the service repository as a workspace setting and leverage a shell command to locate the contextive-demo-go-common package:
    1. $(go list -m -f '{{.Dir}}' github.com/dev-cycles/contextive-demo-go-common)/.contextive/definitions.yml
    2. See ./.vscode/settings.json for an example

When you clone this current repository, after running go build or go test, the dependencies will be downloaded and the definitions defined in contextive-demo-go-common should be available in the UI.

Notes

  • When the definitions are updated in the common package, it will need republishing, and the services will need to update to the latest version of the package to pick up the updated definitions.

  • Contextive currently only activates in VSCode on the presence of a .contextive folder in the repo. To that end, a dummy README.md is included in that folder to ensure Contextive activates.

Similar Resources

A test repo to demonstrate the current (go1.17.2) issue when trying to use retractA test repo to demonstrate the current (go1.17.2) issue when trying to use retract

test-go-mod-retract This is a test repo to demonstrate the current (go1.17.2) issue when trying to use retract in go.mod to retract a version in a non

Oct 16, 2021

Consistent hashing with bounded loads in Golang

consistent This library provides a consistent hashing function which simultaneously achieves both uniformity and consistency. For detailed information

Dec 29, 2022

Consistent hashing with bounded loads in Golang

consistent This library provides a consistent hashing function which simultaneously achieves both uniformity and consistency. For detailed information

Dec 29, 2022

Go library that makes it easy to add automatic retries to your projects, including support for context.Context.

go-retry Go library that makes it easy to add automatic retries to your projects, including support for context.Context. Example with context.Context

Aug 15, 2022

containedctx detects is a linter that detects struct contained context.Context field

containedctx containedctx detects is a linter that detects struct contained context.Context field Instruction go install github.com/sivchari/contained

Oct 22, 2022

Morecontext - Context.Context helpers to make your life slightly easier

morecontext context.Context helpers to make your life slightly easier. -- import

Mar 5, 2022

Tool to manage multiple git repositories

go-many-git Tool to manage multiple git repositories Requirements Proper go installation with GOPATH set git = 1.8.5 Installation go get -u github.co

Aug 27, 2022

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.

Table of contents Introduction Reference Contributing Introduction Overview git-xargs is a command-line tool (CLI) for making updates across multiple

Dec 31, 2022

A better way to clone, organize and manage multiple git repositories

A better way to clone, organize and manage multiple git repositories

git-get git-get is a better way to clone, organize and manage multiple git repositories. git-get Description Installation macOS Linux Windows Usage gi

Nov 16, 2022

CLI tool for manipulating GitHub Labels across multiple repositories

takolabel Installation Mac $ brew install tommy6073/tap/takolabel Other platforms Download from Releases page in this repository. Usage Set variables

Nov 3, 2022

pr-bullet is a tool for copying pull request to multiple repositories.

pr-bullet pr-bullet is a tool for copying pull request to multiple repositories. Usage First, create original pull request ( ex. https://github.com/k1

Oct 5, 2022

Help to release a project which especially has multiple git repositories

This project aims to help to release a project which especially has multiple git repositories. Installation Install it to a Kubernetes cluster. You ca

Dec 15, 2022

git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command

git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command

git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command. You give git-xargs:

Feb 5, 2022

Distributed-Services - Distributed Systems with Golang to consequently build a fully-fletched distributed service

Distributed-Services This project is essentially a result of my attempt to under

Jun 1, 2022

Simple project to demonstrate the loading of eBPF programs via florianl/go-tc.

tc-skeleton Simple project to demonstrate the loading of eBPF programs via florianl/go-tc.

Dec 23, 2022

A reference implementation of blockchain in Go to demonstrate how blockchain works. For education purpose.

A reference implementation of blockchain in Go to demonstrate how blockchain works. For education purpose.

Mini-Blockchain Mini-Blockchain is a reference design for a blockchain system to demostate a full end2end flow in current blockchain technology. There

Nov 18, 2022

A template project to demonstrate how to run WebAssembly functions as sidecar microservices in dapr

A template project to demonstrate how to run WebAssembly functions as sidecar microservices in dapr

Live Demo 1. Introduction DAPR is a portable, event-driven runtime that makes it easy for any developer to build resilient, stateless and stateful app

Jan 3, 2023

Simple Golang API to demonstrate file upload to fireabase storage and retrieving url of uploaded file.

go-firebase-storage -Work in progress 🛠️ Simple Golang API that uses Firebase as its backend to demonstrate various firebase services using Go such a

Oct 4, 2021

This is an example to demonstrate implementation golang microservices using domain driven design principles and sugestions from go-kit

go-kit DDD Domain Driven Design is prevelent and rising standard for organizing your microservice code. This design architecture emphasis on Code orga

Feb 9, 2022
Solution & Framework for JSON-RPC over HTTP

JROH Solution & Framework for JSON-RPC over HTTP Why not OpenAPI? OpenAPI addresses the definition of RESTful APIs, when it comes to JSON-RPCs, some i

Mar 13, 2022
Microservice Boilerplate for Golang with gRPC and RESTful API. Multiple database and client supported
Microservice Boilerplate for Golang with gRPC and RESTful API. Multiple database and client supported

Go Microservice Starter A boilerplate for flexible Go microservice. Table of contents Features Installation Todo List Folder Structures Features: Mult

Jul 28, 2022
Go Micro is a framework for distributed systems development

Go Micro Go Micro is a framework for distributed systems development. Overview Go Micro provides the core requirements for distributed systems develop

Jan 3, 2023
NewSQL distributed storage database based on micro service framework
NewSQL distributed storage database based on micro service framework

QLite 是基于微服务的 NewSQL 型数据库系统,与传统的一体化数据库不同,该系统将本该内置的多种数据结构(STL)拆分成多个服务模块,每个模块都是独立的一个节点,每个节点都与其主网关进行连接,从而形成分布式存储结构。

Jun 19, 2022
CNCF Jaeger, a Distributed Tracing Platform

Jaeger - a Distributed Tracing System Jaeger, inspired by Dapper and OpenZipkin, is a distributed tracing platform created by Uber Technologies and do

Jan 2, 2023
Go-explosion - Distributed indexing and searching in Go/Golang
Go-explosion - Distributed indexing and searching in Go/Golang

go-explosion Distributed indexing and searching in Go/Golang. This library does

Jan 1, 2022
Go Micro: a standard library for distributed systems development

Go Micro Go Micro is a standard library for distributed systems development. Ove

Oct 4, 2022
Labs for MIT 6.824 Distributed Systems (Spring 2020)

6.824-2020-labs This repo contains labs for MIT 6.824 Distributed Systems (Spring 2020) The master branch contains the source code with no implementat

Jan 18, 2022
A db proxy for distributed transaction, read write splitting and sharding! Support any language! It can be deployed as a sidecar in a pod.
A db proxy for distributed transaction, read write splitting and sharding! Support any language! It can be deployed as a sidecar in a pod.

DBPack DBPack means a database cluster tool pack. It can be deployed as a sidecar in a pod, it shields complex basic logic, so that business developme

Dec 29, 2022
Example code to demonstrate how to mock external clients via context.Context

Mocking external client libraries using context.Context This code is paired with a blog post: Mocking external client libraries using context.Context

Nov 6, 2022