refactor: move http api to a new transport layer
This commit is contained in:
parent
476c4b056f
commit
0448f66ab2
41 changed files with 822 additions and 390 deletions
|
|
@ -3,18 +3,18 @@ package roles
|
|||
import (
|
||||
"context"
|
||||
|
||||
"git.wzray.com/homelab/hivemind/internal/types"
|
||||
"git.wzray.com/homelab/hivemind/internal/transport"
|
||||
)
|
||||
|
||||
type Role interface {
|
||||
RegisterHandlers(types.Registrator)
|
||||
RegisterHandlers(transport.Registrator)
|
||||
OnStartup(context.Context) error
|
||||
OnShutdown() error
|
||||
}
|
||||
|
||||
type BaseRole struct{}
|
||||
|
||||
func (r *BaseRole) RegisterHandlers(types.Registrator) {}
|
||||
func (r *BaseRole) RegisterHandlers(transport.Registrator) {}
|
||||
|
||||
func (r *BaseRole) OnStartup(context.Context) error { return nil }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue