Project status badges
This is a gRPC client+service boilerplate / scaffolding. It exposes bi-directional stream service which consumes text file and upper-cases it.
-
Complex
protobuf
nested messages with optional fields. accompanied by wrapperSet*
functions. Wrapper functions are helpful, because generator generateGet*
functions, but omitSet*
functions, which is not convenient for messages with multiple optional fields. Located in pkg/api/mservice. -
DataChunkFile
- ordered stream of data chunks with start/stop marks. Used to transfer custom-sized data (possibly accompanied by metadata) over gRPC stream. Inspired byos.File
, implementsio.Writer
,io.WriterTo
,io.ReaderFrom
,io.Closer
interfaces and thus is compatible/applicable in such functions asio.Copy(dst, src)
. Located in pkg/api/mservice/type_data_chunk_file.go. -
Client server-less tests, based on
mockgen
-generated server-side mocks. Located in pkg/controller/client/client_test.go. -
Service tests
- Client-less tests, used to test both
DataChunk
chunker/tansfer/aggregator and sever-side functionality - Network-less round-trip tests, used to test whole round-trip communication, with full-blown Server, launched during test case and Client dialing to Server. Based on custom in-memory dialer, network not used.
Located in pkg/controller/service/control_plane/server_test.go. Service tests allow to both test service and transport layer functionality.
- Client-less tests, used to test both
-
Multiple housekeeping scripts for convenient project client/service launch, code formatting, code generating, testing, docker image building, etc. Located in dev folder.
-
Kubernetes deployment manifests. Located in deploy folder.