mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-07-04 12:03:43 +02:00
src/api/interface.go: Adding Factory function type.
This commit is contained in:
parent
0081f86f0d
commit
6e8ffe718e
1 changed files with 8 additions and 0 deletions
|
|
@ -15,6 +15,14 @@ type ApiArguments struct {
|
||||||
NumBlocks int
|
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 {
|
type ApiInterface interface {
|
||||||
|
|
||||||
// Returns Logging information
|
// Returns Logging information
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue