1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-17 04:50:02 +02:00

src/api/interface.go: Adding Factory function type.

This commit is contained in:
Henrik Hautakoski 2022-10-25 17:22:33 +02:00
parent 0081f86f0d
commit 6e8ffe718e
No known key found for this signature in database
GPG key ID: 608414D93E862CCD

View file

@ -15,6 +15,14 @@ type ApiArguments struct {
NumBlocks int
}
/**
* Factory function
*
* Each API must implement this function and process `args`
* returing a instance of it's implementation of the ApiInterface
*/
type Factory func(args ApiArguments) ApiInterface
type ApiInterface interface {
// Returns Logging information