Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.44 KB

README.md

File metadata and controls

26 lines (18 loc) · 1.44 KB

providers

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.

builing the plugins from v5 root folder:

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

presentation link:

Plan your code to scale - Provider Pattern

meetup link:

Sep 2024 go meetup @Cyolo