github.com/tickoalcantara12/micro/v3@v3.0.0-20221007104245-9d75b9bcbab9/docs/v2/design/plugins/README.md (about) 1 # Plugins 2 3 Micro operates as an abstraction layer for microservices and distributed systems development. 4 5 ## Overview 6 7 We make use of Go's interface system to create a runtime agnostic abstraction 8 implemented for a variety of underlying systems. Our goal is ultimately to simplify the development 9 experience and provide strongly defined APIs that are understood by the developer. 10 11 ## Implementation 12 13 Our philosophy for plugins and the ecosystem in general is as follows 14 15 - Define a go-micro interface. This becomes the building block e.g Registry 16 - Define a zero dep default implementation e.g memory or mdns 17 - Define a highly available external implementation e.g etcd 18 - Define a "service" implementation using the runtime and implement service e.g micro registry 19 20 ## Feature Matrix 21 22 Here's our list of implementations or preferred list 23 24 Interface | Default | Highly-Available | Service 25 --------- | ------- | ---------------- | ------- 26 Auth | None | X (casbin?) | micro auth 27 Broker | E-NATS | NATS | micro broker 28 Config | memory | X (github?) | micro config 29 Registry | mDNS | etcd | micro registry 30 Store | memory | cockroachdb | micro store 31 32 TODO: complete table 33 34 35 ## Roadmap 36 37 In v2 we plan to streamline how plugins are loaded and used. Rather than specifying a number of core defaults 38 all plugins will move to github.com/micro/go-plugins and we'll look to provide a better developer experience 39 for loading these at build or runtime. 40 41 ## Design Ideas 42 43 Our future goal will be to generate a `plugins.go` file in top level main package. This will be generated 44 via the use of the `--plugins` flag when calling `micro {new, build, run}`. Each command serves a 45 purpose of generating a template, building the service or running it. They'll check for 46 the plugins file and regen as necessary. 47 48 ``` 49 micro run service --plugins=broker/rabbitmq ./... 50 ``` 51 52 Additionally what we'd like to do is generate teh shared objects using GitHub actions against predefined micro/go-micro go.mod deps 53 so we can load modules on the fly.