diff --git a/api/api.go b/api/api.go index 1e81b184..736dbf77 100644 --- a/api/api.go +++ b/api/api.go @@ -10,19 +10,22 @@ import ( ) type Api interface { + // Initialise options + Init(...Option) error + // Get the options + Options() Options // Register a http handler Register(*Endpoint) error // Register a route Deregister(*Endpoint) error - // Init initialises the command line. - // It also parses further options. - //Init(...Option) error - // Options - //Options() Options - // String + // Implemenation of api String() string } +type Options struct {} + +type Option func(*Options) error + // Endpoint is a mapping between an RPC method and HTTP endpoint type Endpoint struct { // RPC Method e.g. Greeter.Hello