You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
496 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. package models
  2. import (
  3. "context"
  4. "time"
  5. )
  6. type DriverProvider interface {
  7. Provide(kind DriverKind) (Driver, error)
  8. }
  9. type Driver interface {
  10. SearchBridge(ctx context.Context, address string, dryRun bool) ([]Bridge, error)
  11. SearchDevices(ctx context.Context, bridge Bridge, timeout time.Duration) ([]Device, error)
  12. Consume(ctx context.Context, bridge Bridge, devices []Device, ch chan Event) (chan<- struct{}, error)
  13. Publish(ctx context.Context, bridge Bridge, devices []Device) error
  14. }