formic

package
v0.0.0-...-4de1a88 Latest Latest
Warning

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

Go to latest
Published: May 5, 2017 License: Apache-2.0 Imports: 15 Imported by: 4

Documentation

Overview

Package formic provides clients for use with Formic servers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formic

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

func NewFormic

func NewFormic(logger *zap.Logger, fsid string, addr string, concurrency int, ftlsConfig *ftls.Config, opts ...grpc.DialOption) *Formic

func (*Formic) Check

func (f *Formic) Check(ctx context.Context, parentINode uint64, childName string) (response string, err error)

func (*Formic) Close

func (f *Formic) Close()

Close will shutdown outgoing connectivity and stop all background goroutines; note that the Formic is no longer usable after a call to Close, including using Startup.

func (*Formic) Create

func (f *Formic) Create(ctx context.Context, parentINode uint64, childName string, childAttr *pb.Attr) (resultingChildAttr *pb.Attr, err error)

func (*Formic) CreateFS

func (f *Formic) CreateFS(ctx context.Context, token string, name string) (fsid string, err error)

func (*Formic) DeleteFS

func (f *Formic) DeleteFS(ctx context.Context, token string, fsid string) (err error)

func (*Formic) GetAttr

func (f *Formic) GetAttr(ctx context.Context, iNode uint64) (attr *pb.Attr, err error)

func (*Formic) GetXAttr

func (f *Formic) GetXAttr(ctx context.Context, iNode uint64, name string, size uint32, position uint32) (xAttr []byte, err error)

func (*Formic) GrantAddressFS

func (f *Formic) GrantAddressFS(ctx context.Context, token string, fsid string, address string) (err error)

func (*Formic) InitFS

func (f *Formic) InitFS(ctx context.Context) (err error)

func (*Formic) ListFS

func (f *Formic) ListFS(ctx context.Context, token string) (list []*pb.FSIDName, err error)

func (*Formic) ListXAttr

func (f *Formic) ListXAttr(ctx context.Context, iNode uint64, size uint32, position uint32) (xAttr []byte, err error)

func (*Formic) Lookup

func (f *Formic) Lookup(ctx context.Context, parent uint64, name string) (attr *pb.Attr, err error)

func (*Formic) MkDir

func (f *Formic) MkDir(ctx context.Context, parent uint64, name string, attr *pb.Attr) (resultingAttr *pb.Attr, err error)

func (*Formic) Read

func (f *Formic) Read(ctx context.Context, iNode uint64, offset int64, size int64) (payload []byte, err error)

func (*Formic) ReadDirAll

func (f *Formic) ReadDirAll(ctx context.Context, iNode uint64) (readDirAllEnts []*pb.ReadDirAllEnt, err error)
func (f *Formic) ReadLink(ctx context.Context, iNode uint64) (target string, err error)

func (*Formic) Remove

func (f *Formic) Remove(ctx context.Context, parent uint64, name string) (err error)

func (*Formic) RemoveXAttr

func (f *Formic) RemoveXAttr(ctx context.Context, iNode uint64, name string) (err error)

func (*Formic) Rename

func (f *Formic) Rename(ctx context.Context, oldParent uint64, newParent uint64, oldName string, newName string) (err error)

func (*Formic) RevokeAddressFS

func (f *Formic) RevokeAddressFS(ctx context.Context, token string, fsid string, address string) (err error)

func (*Formic) SetAttr

func (f *Formic) SetAttr(ctx context.Context, attr *pb.Attr, valid uint32) (resultingAttr *pb.Attr, err error)

func (*Formic) SetXAttr

func (f *Formic) SetXAttr(ctx context.Context, iNode uint64, name string, value []byte, position uint32, flags uint32) (err error)

func (*Formic) ShowFS

func (f *Formic) ShowFS(ctx context.Context, token string, fsid string) (name string, addresses []string, err error)

func (*Formic) Shutdown

func (f *Formic) Shutdown(ctx context.Context) error

Shutdown will close any existing connections; note that Startup may automatically get called with any further activity, but it will use a new connection. To ensure the Formic has no further activity, use Close.

func (*Formic) Startup

func (f *Formic) Startup(ctx context.Context) error

func (*Formic) StatFS

func (f *Formic) StatFS(ctx context.Context) (blocks uint64, bFree uint64, bAvail uint64, files uint64, fFree uint64, bSize uint32, nameLen uint32, frSize uint32, err error)
func (f *Formic) SymLink(ctx context.Context, parent uint64, name string, target string, uid uint32, gid uint32) (attr *pb.Attr, err error)

func (*Formic) UpdateFS

func (f *Formic) UpdateFS(ctx context.Context, token string, fsid string, newName string) (err error)

func (*Formic) Write

func (f *Formic) Write(ctx context.Context, iNode uint64, offset int64, payload []byte) (err error)

type FuseFormic

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

FuseFormic is a client that glues a mountpoint to a Formic server via the Fuse kernel interface.

func NewFuseFormic

func NewFuseFormic(cfg *FuseFormicConfig) *FuseFormic

func (*FuseFormic) Serve

func (f *FuseFormic) Serve() error

Serve will run forever, or until an error occurs, continuously handling Fuse requests and Formic responses.

type FuseFormicConfig

type FuseFormicConfig struct {
	Logger     *zap.Logger
	Mountpoint string
	Address    string
	FSID       string
	AllowOther bool
	ReadOnly   bool
}

Directories

Path Synopsis
Package main builds a 'cfsdvp' executable for use as a Docker driver; EXPERIMENTAL.
Package main builds a 'cfsdvp' executable for use as a Docker driver; EXPERIMENTAL.
Package formicproto is a generated protocol buffer package.
Package formicproto is a generated protocol buffer package.
Package server provides a server implementation of a single node of a formic cluster.
Package server provides a server implementation of a single node of a formic cluster.

Jump to

Keyboard shortcuts

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