Documentation ¶
Overview ¶
Package services provides a global repository of cchat services. It also supports additional sources.
Registering services ¶
To register a service, it's best to call RegisterService() in the package's init(). This allows for dash imports:
_ "git.sr.ht/~user/cchat-abc"
Registering sources ¶
Sources are simply functions that manage other services. An example of this would be the plugins package. Note that only packages that can error out on load should do this. A package can call RegisterService() multiple times.
For examples on using RegisterSource(), check the plugins package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
Get returns all services. It will also fetch the plugins from all sources. Future calls will not fetch the plugins again.
func RegisterService ¶
RegisterService adds a service.
func RegisterSource ¶
func RegisterSource(source func() []error)
RegisterSource adds a service source. Services are expected to call RegisterService() on source().
Types ¶
This section is empty.