File: interface.go

package info (click to toggle)
incus 6.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 25,220 kB
  • sloc: sh: 16,810; ansic: 3,122; python: 460; makefile: 341; ruby: 51; sql: 50; lisp: 6
file content (23 lines) | stat: -rw-r--r-- 489 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package drivers

import (
	"context"

	"github.com/lxc/incus/v6/shared/logger"
)

// driver is the extended internal interface.
type driver interface {
	Driver

	init(logger logger.Logger, path string)
	load(ctx context.Context) error
}

// Driver represents a low-level fs notification driver.
type Driver interface {
	Name() string
	PrefixPath() string
	Watch(path string, identifier string, f func(path string, event string) bool) error
	Unwatch(path string, identifier string) error
}