Plan your code to scale - Provider Pattern demo code from Sep 2024 go meetup @Cyolo
This repo demonstrates a walkthrough from a simple implemntation of a code iterfacing with an SMS provider to a pluggable system that can easily scale,
-
v1 and v2 are quoted within the presentation (pages 6 and 11-17 respectively)
-
v3 - implements Separation of concerns (page 20)
-
v4 - implements constructor dependency injection (page 21)
-
v5 - implements usage of plugins
-
v6 - implements usage of go.uber.org/fx dependency injection (page 35)
-
tax - is just a mock used for pages 28-29.
go build -buildmode=plugin -o sms/plugin/twilio.so sms/plugin/twilio/twilio.go
go build -buildmode=plugin -o sms/plugin/alibaba.so sms/plugin/alibaba/alibaba.go