Documentation ¶
Index ¶
- Variables
- type BranchFilter
- func (v *BranchFilter) CopyObject(ctx context.Context, from *tree.Node, to *tree.Node, ...) (models.ObjectInfo, error)
- func (v *BranchFilter) CreateNode(ctx context.Context, in *tree.CreateNodeRequest, opts ...grpc.CallOption) (*tree.CreateNodeResponse, error)
- func (v *BranchFilter) DeleteNode(ctx context.Context, in *tree.DeleteNodeRequest, opts ...grpc.CallOption) (*tree.DeleteNodeResponse, error)
- func (v *BranchFilter) ExecuteWrapped(inputFilter nodes.FilterFunc, outputFilter nodes.FilterFunc, ...) error
- func (v *BranchFilter) GetObject(ctx context.Context, node *tree.Node, requestData *models.GetRequestData) (io.ReadCloser, error)
- func (v *BranchFilter) GetRootKeys(rootNodes []string) (map[string]*tree.Node, error)
- func (v *BranchFilter) ListNodes(ctx context.Context, in *tree.ListNodesRequest, opts ...grpc.CallOption) (streamer tree.NodeProvider_ListNodesClient, e error)
- func (v *BranchFilter) LookupRoot(uuid string) (*tree.Node, error)
- func (v *BranchFilter) MakeRootKey(rNode *tree.Node) string
- func (v *BranchFilter) MultipartAbort(ctx context.Context, node *tree.Node, uploadID string, ...) error
- func (v *BranchFilter) MultipartComplete(ctx context.Context, target *tree.Node, uploadID string, ...) (models.ObjectInfo, error)
- func (v *BranchFilter) MultipartCreate(ctx context.Context, node *tree.Node, requestData *models.MultipartRequestData) (string, error)
- func (v *BranchFilter) MultipartListObjectParts(ctx context.Context, target *tree.Node, uploadID string, partNumberMarker int, ...) (lpi models.ListObjectPartsResult, er error)
- func (v *BranchFilter) MultipartPutObjectPart(ctx context.Context, target *tree.Node, uploadID string, partNumberMarker int, ...) (models.MultipartObjectPart, error)
- func (v *BranchFilter) PutObject(ctx context.Context, node *tree.Node, reader io.Reader, ...) (models.ObjectInfo, error)
- func (v *BranchFilter) ReadNode(ctx context.Context, in *tree.ReadNodeRequest, opts ...grpc.CallOption) (*tree.ReadNodeResponse, error)
- func (v *BranchFilter) StreamChanges(ctx context.Context, in *tree.StreamChangesRequest, opts ...grpc.CallOption) (tree.NodeChangesStreamer_StreamChangesClient, error)
- func (v *BranchFilter) UpdateNode(ctx context.Context, in *tree.UpdateNodeRequest, opts ...grpc.CallOption) (*tree.UpdateNodeResponse, error)
- type ContextWrapper
- type Handler
- func (a *Handler) AdaptOptions(h nodes.Handler, options nodes.RouterOptions)
- func (a *Handler) CopyObject(ctx context.Context, from *tree.Node, to *tree.Node, ...) (models.ObjectInfo, error)
- func (a *Handler) CreateNode(ctx context.Context, in *tree.CreateNodeRequest, opts ...grpc.CallOption) (*tree.CreateNodeResponse, error)
- func (a *Handler) DeleteNode(ctx context.Context, in *tree.DeleteNodeRequest, opts ...grpc.CallOption) (*tree.DeleteNodeResponse, error)
- func (a *Handler) ExecuteWrapped(inputFilter nodes.FilterFunc, outputFilter nodes.FilterFunc, ...) error
- func (a *Handler) GetObject(ctx context.Context, node *tree.Node, requestData *models.GetRequestData) (io.ReadCloser, error)
- func (a *Handler) ListNodes(ctx context.Context, in *tree.ListNodesRequest, opts ...grpc.CallOption) (tree.NodeProvider_ListNodesClient, error)
- func (a *Handler) ListNodesWithCallback(ctx context.Context, request *tree.ListNodesRequest, callback nodes.WalkFunc, ...) error
- func (a *Handler) MultipartAbort(ctx context.Context, target *tree.Node, uploadID string, ...) error
- func (a *Handler) MultipartComplete(ctx context.Context, target *tree.Node, uploadID string, ...) (models.ObjectInfo, error)
- func (a *Handler) MultipartCreate(ctx context.Context, target *tree.Node, ...) (string, error)
- func (a *Handler) MultipartList(ctx context.Context, prefix string, requestData *models.MultipartRequestData) (models.ListMultipartUploadsResult, error)
- func (a *Handler) MultipartListObjectParts(ctx context.Context, target *tree.Node, uploadID string, partNumberMarker int, ...) (models.ListObjectPartsResult, error)
- func (a *Handler) MultipartPutObjectPart(ctx context.Context, target *tree.Node, uploadID string, partNumberMarker int, ...) (models.MultipartObjectPart, error)
- func (a *Handler) PutObject(ctx context.Context, node *tree.Node, reader io.Reader, ...) (models.ObjectInfo, error)
- func (a *Handler) ReadNode(ctx context.Context, in *tree.ReadNodeRequest, opts ...grpc.CallOption) (*tree.ReadNodeResponse, error)
- func (a *Handler) SetClientsPool(p nodes.SourcesPool)
- func (a *Handler) SetNextHandler(h nodes.Handler)
- func (a *Handler) StreamChanges(ctx context.Context, in *tree.StreamChangesRequest, opts ...grpc.CallOption) (tree.NodeChangesStreamer_StreamChangesClient, error)
- func (a *Handler) UpdateNode(ctx context.Context, in *tree.UpdateNodeRequest, opts ...grpc.CallOption) (*tree.UpdateNodeResponse, error)
- func (a *Handler) WrapContext(ctx context.Context) (context.Context, error)
- func (a *Handler) WrappedCanApply(srcCtx context.Context, targetCtx context.Context, ...) error
- type VirtualNodesManager
- func (m *VirtualNodesManager) ByPath(path string) (*tree.Node, bool)
- func (m *VirtualNodesManager) ByUuid(uuid string) (*tree.Node, bool)
- func (m *VirtualNodesManager) GetResolver(createIfNotExists bool) func(context.Context, *tree.Node) (*tree.Node, bool)
- func (m *VirtualNodesManager) ListNodes() []*tree.Node
- func (m *VirtualNodesManager) Load(forceReload ...bool)
- func (m *VirtualNodesManager) ResolveInContext(ctx context.Context, vNode *tree.Node, create bool, retry ...bool) (*tree.Node, error)
Constants ¶
This section is empty.
Variables ¶
var (
AdminClientProvider func(runtime context.Context) nodes.Client
)
Functions ¶
This section is empty.
Types ¶
type BranchFilter ¶
type BranchFilter struct { Handler InputMethod nodes.FilterFunc OutputMethod nodes.FilterFunc RootNodesCache cache.Cache }
BranchFilter is a ready-made Handler that can be used by all handlers that just modify the path in one way or another before forwarding calls to Next handler.
func (*BranchFilter) CopyObject ¶
func (v *BranchFilter) CopyObject(ctx context.Context, from *tree.Node, to *tree.Node, requestData *models.CopyRequestData) (models.ObjectInfo, error)
func (*BranchFilter) CreateNode ¶
func (v *BranchFilter) CreateNode(ctx context.Context, in *tree.CreateNodeRequest, opts ...grpc.CallOption) (*tree.CreateNodeResponse, error)
func (*BranchFilter) DeleteNode ¶
func (v *BranchFilter) DeleteNode(ctx context.Context, in *tree.DeleteNodeRequest, opts ...grpc.CallOption) (*tree.DeleteNodeResponse, error)
func (*BranchFilter) ExecuteWrapped ¶
func (v *BranchFilter) ExecuteWrapped(inputFilter nodes.FilterFunc, outputFilter nodes.FilterFunc, provider nodes.CallbackFunc) error
func (*BranchFilter) GetObject ¶
func (v *BranchFilter) GetObject(ctx context.Context, node *tree.Node, requestData *models.GetRequestData) (io.ReadCloser, error)
func (*BranchFilter) GetRootKeys ¶
func (*BranchFilter) ListNodes ¶
func (v *BranchFilter) ListNodes(ctx context.Context, in *tree.ListNodesRequest, opts ...grpc.CallOption) (streamer tree.NodeProvider_ListNodesClient, e error)
func (*BranchFilter) LookupRoot ¶
func (v *BranchFilter) LookupRoot(uuid string) (*tree.Node, error)
func (*BranchFilter) MakeRootKey ¶
func (v *BranchFilter) MakeRootKey(rNode *tree.Node) string
func (*BranchFilter) MultipartAbort ¶
func (v *BranchFilter) MultipartAbort(ctx context.Context, node *tree.Node, uploadID string, requestData *models.MultipartRequestData) error
func (*BranchFilter) MultipartComplete ¶
func (v *BranchFilter) MultipartComplete(ctx context.Context, target *tree.Node, uploadID string, uploadedParts []models.MultipartObjectPart) (models.ObjectInfo, error)
func (*BranchFilter) MultipartCreate ¶
func (v *BranchFilter) MultipartCreate(ctx context.Context, node *tree.Node, requestData *models.MultipartRequestData) (string, error)
func (*BranchFilter) MultipartListObjectParts ¶
func (*BranchFilter) MultipartPutObjectPart ¶
func (v *BranchFilter) MultipartPutObjectPart(ctx context.Context, target *tree.Node, uploadID string, partNumberMarker int, reader io.Reader, requestData *models.PutRequestData) (models.MultipartObjectPart, error)
func (*BranchFilter) PutObject ¶
func (v *BranchFilter) PutObject(ctx context.Context, node *tree.Node, reader io.Reader, requestData *models.PutRequestData) (models.ObjectInfo, error)
func (*BranchFilter) ReadNode ¶
func (v *BranchFilter) ReadNode(ctx context.Context, in *tree.ReadNodeRequest, opts ...grpc.CallOption) (*tree.ReadNodeResponse, error)
func (*BranchFilter) StreamChanges ¶
func (v *BranchFilter) StreamChanges(ctx context.Context, in *tree.StreamChangesRequest, opts ...grpc.CallOption) (tree.NodeChangesStreamer_StreamChangesClient, error)
func (*BranchFilter) UpdateNode ¶
func (v *BranchFilter) UpdateNode(ctx context.Context, in *tree.UpdateNodeRequest, opts ...grpc.CallOption) (*tree.UpdateNodeResponse, error)
type Handler ¶
type Handler struct { Next nodes.Handler ClientsPool nodes.SourcesPool RuntimeCtx context.Context CtxWrapper ContextWrapper }
Handler provides the simplest implementation of Handler and forwards all calls to the Next handler
func (*Handler) AdaptOptions ¶
func (a *Handler) AdaptOptions(h nodes.Handler, options nodes.RouterOptions)
func (*Handler) CopyObject ¶
func (*Handler) CreateNode ¶
func (a *Handler) CreateNode(ctx context.Context, in *tree.CreateNodeRequest, opts ...grpc.CallOption) (*tree.CreateNodeResponse, error)
func (*Handler) DeleteNode ¶
func (a *Handler) DeleteNode(ctx context.Context, in *tree.DeleteNodeRequest, opts ...grpc.CallOption) (*tree.DeleteNodeResponse, error)
func (*Handler) ExecuteWrapped ¶
func (a *Handler) ExecuteWrapped(inputFilter nodes.FilterFunc, outputFilter nodes.FilterFunc, provider nodes.CallbackFunc) error
func (*Handler) GetObject ¶
func (a *Handler) GetObject(ctx context.Context, node *tree.Node, requestData *models.GetRequestData) (io.ReadCloser, error)
func (*Handler) ListNodes ¶
func (a *Handler) ListNodes(ctx context.Context, in *tree.ListNodesRequest, opts ...grpc.CallOption) (tree.NodeProvider_ListNodesClient, error)
func (*Handler) ListNodesWithCallback ¶
func (*Handler) MultipartAbort ¶
func (*Handler) MultipartComplete ¶
func (*Handler) MultipartCreate ¶
func (*Handler) MultipartList ¶
func (a *Handler) MultipartList(ctx context.Context, prefix string, requestData *models.MultipartRequestData) (models.ListMultipartUploadsResult, error)
func (*Handler) MultipartListObjectParts ¶
func (*Handler) MultipartPutObjectPart ¶
func (*Handler) ReadNode ¶
func (a *Handler) ReadNode(ctx context.Context, in *tree.ReadNodeRequest, opts ...grpc.CallOption) (*tree.ReadNodeResponse, error)
func (*Handler) SetClientsPool ¶
func (a *Handler) SetClientsPool(p nodes.SourcesPool)
func (*Handler) SetNextHandler ¶
func (*Handler) StreamChanges ¶
func (a *Handler) StreamChanges(ctx context.Context, in *tree.StreamChangesRequest, opts ...grpc.CallOption) (tree.NodeChangesStreamer_StreamChangesClient, error)
func (*Handler) UpdateNode ¶
func (a *Handler) UpdateNode(ctx context.Context, in *tree.UpdateNodeRequest, opts ...grpc.CallOption) (*tree.UpdateNodeResponse, error)
func (*Handler) WrapContext ¶
func (*Handler) WrappedCanApply ¶
type VirtualNodesManager ¶
type VirtualNodesManager struct {
// contains filtered or unexported fields
}
VirtualNodesManager keeps an internal list of virtual nodes. They are cached for one minute to avoid too many requests on docstore service.
func GetVirtualNodesManager ¶
func GetVirtualNodesManager(ctx context.Context) *VirtualNodesManager
GetVirtualNodesManager creates a new VirtualNodesManager.
func (*VirtualNodesManager) ByPath ¶
func (m *VirtualNodesManager) ByPath(path string) (*tree.Node, bool)
ByPath finds a VirtualNode by its Path.
func (*VirtualNodesManager) ByUuid ¶
func (m *VirtualNodesManager) ByUuid(uuid string) (*tree.Node, bool)
ByUuid finds a VirtualNode by its Uuid.
func (*VirtualNodesManager) GetResolver ¶
func (m *VirtualNodesManager) GetResolver(createIfNotExists bool) func(context.Context, *tree.Node) (*tree.Node, bool)
GetResolver injects some dependencies to generate a simple resolver function
func (*VirtualNodesManager) ListNodes ¶
func (m *VirtualNodesManager) ListNodes() []*tree.Node
ListNodes simply returns the internally cached list.
func (*VirtualNodesManager) Load ¶
func (m *VirtualNodesManager) Load(forceReload ...bool)
Load requests the virtual nodes from the DocStore service.
func (*VirtualNodesManager) ResolveInContext ¶
func (m *VirtualNodesManager) ResolveInContext(ctx context.Context, vNode *tree.Node, create bool, retry ...bool) (*tree.Node, error)
ResolveInContext computes the actual node Path based on the resolution metadata of the virtual node and the current metadata contained in context.