wsremote

package
v0.0.99 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FileSyncService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "foundation.internal.wsremote.FileSyncService",
	HandlerType: (*FileSyncServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Push",
			Handler:    _FileSyncService_Push_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/fnfs/workspace/wsremote/protocol.proto",
}

FileSyncService_ServiceDesc is the grpc.ServiceDesc for FileSyncService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_internal_fnfs_workspace_wsremote_protocol_proto protoreflect.FileDescriptor

Functions

func ObserveAndPush

func ObserveAndPush(absPath, rel string, sink Sink) compute.Computable[wscontents.Versioned]

Returns a wscontents.Versioned which will produce a local snapshot as expected but forwards all filesystem events (e.g. changes, removals) to the specified sink.

func RegisterFileSyncServiceServer

func RegisterFileSyncServiceServer(s grpc.ServiceRegistrar, srv FileSyncServiceServer)

Types

type DepositFunc

type DepositFunc func(context.Context, *Signature, []*wscontents.FileEvent) (bool, error)

type FileSyncServiceClient

type FileSyncServiceClient interface {
	Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushResponse, error)
}

FileSyncServiceClient is the client API for FileSyncService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type FileSyncServiceServer

type FileSyncServiceServer interface {
	Push(context.Context, *PushRequest) (*PushResponse, error)
}

FileSyncServiceServer is the server API for FileSyncService service. All implementations should embed UnimplementedFileSyncServiceServer for forward compatibility

type PushRequest

type PushRequest struct {
	Signature *Signature              `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	FileEvent []*wscontents.FileEvent `protobuf:"bytes,2,rep,name=file_event,json=fileEvent,proto3" json:"file_event,omitempty"`
	// contains filtered or unexported fields
}

func (*PushRequest) Descriptor deprecated

func (*PushRequest) Descriptor() ([]byte, []int)

Deprecated: Use PushRequest.ProtoReflect.Descriptor instead.

func (*PushRequest) GetFileEvent

func (x *PushRequest) GetFileEvent() []*wscontents.FileEvent

func (*PushRequest) GetSignature

func (x *PushRequest) GetSignature() *Signature

func (*PushRequest) ProtoMessage

func (*PushRequest) ProtoMessage()

func (*PushRequest) ProtoReflect

func (x *PushRequest) ProtoReflect() protoreflect.Message

func (*PushRequest) Reset

func (x *PushRequest) Reset()

func (*PushRequest) String

func (x *PushRequest) String() string

type PushResponse

type PushResponse struct {
	// contains filtered or unexported fields
}

func (*PushResponse) Descriptor deprecated

func (*PushResponse) Descriptor() ([]byte, []int)

Deprecated: Use PushResponse.ProtoReflect.Descriptor instead.

func (*PushResponse) ProtoMessage

func (*PushResponse) ProtoMessage()

func (*PushResponse) ProtoReflect

func (x *PushResponse) ProtoReflect() protoreflect.Message

func (*PushResponse) Reset

func (x *PushResponse) Reset()

func (*PushResponse) String

func (x *PushResponse) String() string

type Signature

type Signature struct {
	ModuleName string `protobuf:"bytes,1,opt,name=module_name,json=moduleName,proto3" json:"module_name,omitempty"`
	Rel        string `protobuf:"bytes,2,opt,name=rel,proto3" json:"rel,omitempty"`
	// contains filtered or unexported fields
}

func (*Signature) Descriptor deprecated

func (*Signature) Descriptor() ([]byte, []int)

Deprecated: Use Signature.ProtoReflect.Descriptor instead.

func (*Signature) GetModuleName

func (x *Signature) GetModuleName() string

func (*Signature) GetRel

func (x *Signature) GetRel() string

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) ProtoReflect

func (x *Signature) ProtoReflect() protoreflect.Message

func (*Signature) Reset

func (x *Signature) Reset()

func (*Signature) String

func (x *Signature) String() string

type Sink

type Sink interface {
	Deposit(context.Context, []*wscontents.FileEvent) (bool, error)
}

type SinkRegistrar

type SinkRegistrar struct {
	// contains filtered or unexported fields
}

func BufferAndSinkTo

func BufferAndSinkTo(ctx context.Context, f DepositFunc) (context.Context, *SinkRegistrar)

func Ctx

func Ctx(ctx context.Context) *SinkRegistrar

func (*SinkRegistrar) For

func (r *SinkRegistrar) For(sig *Signature) Sink

type UnimplementedFileSyncServiceServer

type UnimplementedFileSyncServiceServer struct {
}

UnimplementedFileSyncServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedFileSyncServiceServer) Push

type UnsafeFileSyncServiceServer

type UnsafeFileSyncServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeFileSyncServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FileSyncServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL