4 changed files with 38 additions and 39 deletions
			
			
		| @ -1,14 +1,17 @@ | |||
| package models | |||
| 
 | |||
| import "context" | |||
| import ( | |||
| 	"context" | |||
| 	"time" | |||
| ) | |||
| 
 | |||
| type DriverResolver interface { | |||
| 	ResolveFor(bridge Bridge) (Driver, error) | |||
| } | |||
| 
 | |||
| type Driver interface { | |||
| 	SearchBridge(ctx context.Context, address string) (Bridge, error) | |||
| 	SearchDevices(ctx context.Context, bridge Bridge) ([]Device, error) | |||
| 	SearchBridge(ctx context.Context, address string, dryRun bool) ([]Bridge, error) | |||
| 	SearchDevices(ctx context.Context, bridge Bridge, timeout time.Duration) ([]Device, error) | |||
| 	Consume(ctx context.Context, bridge Bridge, devices []Device, ch chan Event) (chan<- struct{}, error) | |||
| 	Publish(ctx context.Context, bridge Bridge, device Device) error | |||
| 	Publish(ctx context.Context, bridge Bridge, devices []Device) error | |||
| } | |||
						Write
						Preview
					
					
					Loading…
					
					Cancel
						Save
					
		Reference in new issue