Documentation ¶
Index ¶
- Variables
- func AggregateFSEvents(watcher filewatcher.EventsAndErrors, debugLogger, errLogger io.Writer, ...)
- func Observe(absPath, rel string, observeChanges bool) compute.Computable[Versioned]
- func SnapshotContents(ctx context.Context, modulePath, rel string) (*memfs.FS, error)
- func SnapshotDirectory(ctx context.Context, absPath string) (*memfs.FS, error)
- type FileEvent
- func (*FileEvent) Descriptor() ([]byte, []int)deprecated
- func (x *FileEvent) GetEvent() FileEvent_EventType
- func (x *FileEvent) GetMode() uint32
- func (x *FileEvent) GetNewContents() []byte
- func (x *FileEvent) GetPath() string
- func (*FileEvent) ProtoMessage()
- func (x *FileEvent) ProtoReflect() protoreflect.Message
- func (x *FileEvent) Reset()
- func (x *FileEvent) String() string
- type FileEvent_EventType
- func (FileEvent_EventType) Descriptor() protoreflect.EnumDescriptor
- func (x FileEvent_EventType) Enum() *FileEvent_EventType
- func (FileEvent_EventType) EnumDescriptor() ([]byte, []int)deprecated
- func (x FileEvent_EventType) Number() protoreflect.EnumNumber
- func (x FileEvent_EventType) String() string
- func (FileEvent_EventType) Type() protoreflect.EnumType
- type OnNewSnapshopFunc
- type Versioned
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FileEvent_EventType_name = map[int32]string{ 0: "UNKNOWN", 1: "WRITE", 2: "REMOVE", 3: "MKDIR", } FileEvent_EventType_value = map[string]int32{ "UNKNOWN": 0, "WRITE": 1, "REMOVE": 2, "MKDIR": 3, } )
Enum value maps for FileEvent_EventType.
View Source
var File_internal_wscontents_types_proto protoreflect.FileDescriptor
Functions ¶
func AggregateFSEvents ¶
func AggregateFSEvents(watcher filewatcher.EventsAndErrors, debugLogger, errLogger io.Writer, bufferCh chan []fsnotify.Event)
func Observe ¶
func Observe(absPath, rel string, observeChanges bool) compute.Computable[Versioned]
Observe returns a Computable that is Versioned, that is, it produces a value but can also be observed for updates. It produces a new revision whenever the filesystem is updated. Returns a Computable[Versioned]
func SnapshotContents ¶
Types ¶
type FileEvent ¶
type FileEvent struct { Event FileEvent_EventType `protobuf:"varint,1,opt,name=event,proto3,enum=foundation.internal.wscontents.FileEvent_EventType" json:"event,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` NewContents []byte `protobuf:"bytes,3,opt,name=new_contents,json=newContents,proto3" json:"new_contents,omitempty"` Mode uint32 `protobuf:"varint,4,opt,name=mode,proto3" json:"mode,omitempty"` // contains filtered or unexported fields }
func (*FileEvent) Descriptor
deprecated
func (*FileEvent) GetEvent ¶
func (x *FileEvent) GetEvent() FileEvent_EventType
func (*FileEvent) GetNewContents ¶
func (*FileEvent) ProtoMessage ¶
func (*FileEvent) ProtoMessage()
func (*FileEvent) ProtoReflect ¶
func (x *FileEvent) ProtoReflect() protoreflect.Message
type FileEvent_EventType ¶
type FileEvent_EventType int32
const ( FileEvent_UNKNOWN FileEvent_EventType = 0 FileEvent_WRITE FileEvent_EventType = 1 FileEvent_REMOVE FileEvent_EventType = 2 FileEvent_MKDIR FileEvent_EventType = 3 )
func (FileEvent_EventType) Descriptor ¶
func (FileEvent_EventType) Descriptor() protoreflect.EnumDescriptor
func (FileEvent_EventType) Enum ¶
func (x FileEvent_EventType) Enum() *FileEvent_EventType
func (FileEvent_EventType) EnumDescriptor
deprecated
func (FileEvent_EventType) EnumDescriptor() ([]byte, []int)
Deprecated: Use FileEvent_EventType.Descriptor instead.
func (FileEvent_EventType) Number ¶
func (x FileEvent_EventType) Number() protoreflect.EnumNumber
func (FileEvent_EventType) String ¶
func (x FileEvent_EventType) String() string
func (FileEvent_EventType) Type ¶
func (FileEvent_EventType) Type() protoreflect.EnumType
type OnNewSnapshopFunc ¶
type OnNewSnapshopFunc func(context.Context, fnfs.ReadWriteFS, []*FileEvent) (fnfs.ReadWriteFS, bool, error)
Click to show internal directories.
Click to hide internal directories.