Move API to instance
wybiral opened this issue · 1 comments
wybiral commented
The new interface should look something like this:
h := hookah.New()
creates a new instance of hookahr, err := h.NewInput("proto://args")
create a new input (ReadCloser)w, err := h.NewOutput("proto://args")
create a new output (WriteCloser)h.RegisterInput("proto", handler)
register input handlerh.RegisterOutput("proto", handler)
register output handler
This will allow the current default handlers to all be registered the same way as user-defined ones and will make it easier to enumerate them (so they can be listed by the application).