Add initial Go server skeleton with HTTP handlers, middleware, job runner, and stubs
This commit is contained in:
20
internal/service/interfaces.go
Normal file
20
internal/service/interfaces.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/example/storage-appliance/internal/domain"
|
||||
)
|
||||
|
||||
type DiskService interface {
|
||||
List(ctx context.Context) ([]domain.Disk, error)
|
||||
Inspect(ctx context.Context, path string) (domain.Disk, error)
|
||||
}
|
||||
|
||||
type ZFSService interface {
|
||||
ListPools(ctx context.Context) ([]domain.Pool, error)
|
||||
CreatePool(ctx context.Context, name string, vdevs []string) (string, error)
|
||||
}
|
||||
|
||||
type JobRunner interface {
|
||||
Enqueue(ctx context.Context, j domain.Job) (string, error)
|
||||
}
|
||||
Reference in New Issue
Block a user