Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var IpfsAddr string
View Source
var MaxThreadsConn int
View Source
var MinThreadsConn int
View Source
var MongoHost string
View Source
var MongoPw string
View Source
var MongoRepSet string
View Source
var MongoUsr string
Functions ¶
Types ¶
type Bucket ¶
type Bucket interface { Slug() string Key() string GetData() BucketData GetContext(ctx context.Context) (context.Context, *thread.ID, error) DirExists(ctx context.Context, path string) (bool, error) FileExists(ctx context.Context, path string) (bool, error) UploadFile( ctx context.Context, path string, reader io.Reader, ) (result path.Resolved, root path.Path, err error) GetFile( ctx context.Context, path string, w io.Writer, ) error CreateDirectory( ctx context.Context, path string, ) (result path.Resolved, root path.Path, err error) ListDirectory( ctx context.Context, path string, ) (*DirEntries, error) DeleteDirOrFile( ctx context.Context, path string, ) (path.Resolved, error) }
type BucketData ¶
type BucketRoot ¶
type BucketRoot buckets_pb.Root
type BucketsClient ¶
type BucketsClient interface { PushPath(ctx context.Context, key, pth string, reader io.Reader, opts ...bucketsClient.Option) (result path.Resolved, root path.Resolved, err error) PullPath(ctx context.Context, key, pth string, writer io.Writer, opts ...bucketsClient.Option) error ListPath(ctx context.Context, key, pth string) (*bucketsproto.ListPathReply, error) RemovePath(ctx context.Context, key, pth string, opts ...bucketsClient.Option) (path.Resolved, error) }
type Client ¶
type Client interface { IsRunning() bool GetDefaultBucket(ctx context.Context) (Bucket, error) GetBucket(ctx context.Context, slug string) (Bucket, error) GetBaseThreadsContext(ctx context.Context) (context.Context, error) GetBucketContext(ctx context.Context, bucketSlug string) (context.Context, *thread.ID, error) GetLocalBucketContext(ctx context.Context, bucketSlug string) (context.Context, *thread.ID, error) GetThreadsConnection() (*threadsClient.Client, error) ListBuckets(ctx context.Context) ([]Bucket, error) CreateBucket(ctx context.Context, bucketSlug string) (Bucket, error) JoinBucket(ctx context.Context, slug string, ti *domain.ThreadInfo) (bool, error) Shutdown() error WaitForReady() chan bool StartAndBootstrap(ctx context.Context, cfg config.Config) error }
type DirEntries ¶
type DirEntries buckets_pb.ListPathReply
type EventHandler ¶
type EventHandler interface { OnCreate(bucketData *BucketData, listenEvent *tc.ListenEvent) OnRemove(bucketData *BucketData, listenEvent *tc.ListenEvent) OnSave(bucketData *BucketData, listenEvent *tc.ListenEvent) }
EventHandler
type TextileBuckd ¶
type TextileBuckd struct { IsRunning bool // contains filtered or unexported fields }
func NewBuckd ¶
func NewBuckd(cfg config.Config) *TextileBuckd
func (*TextileBuckd) Shutdown ¶
func (tb *TextileBuckd) Shutdown() error
func (*TextileBuckd) Stop ¶
func (tb *TextileBuckd) Stop() error
type TextileThreadsd ¶
type TextileThreadsd struct {
// contains filtered or unexported fields
}
func (*TextileThreadsd) Start ¶
func (tt *TextileThreadsd) Start() error
func (*TextileThreadsd) Stop ¶
func (tt *TextileThreadsd) Stop() error
func (*TextileThreadsd) WaitForReady ¶
func (tt *TextileThreadsd) WaitForReady() chan bool
type ThreadListener ¶
type ThreadListener interface { Listen(ctx context.Context) error Close() RegisterHandler(handler EventHandler) }
func NewListener ¶
func NewListener(textileClient Client, bucketSlug string, handlers []EventHandler) ThreadListener
Click to show internal directories.
Click to hide internal directories.