local

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XXH3 digest.Algorithm = "xxh3"
)

Variables

This section is empty.

Functions

func NewSource

func NewSource(opt Opt) (source.Source, error)

Types

type CacheRefMetadata

type CacheRefMetadata struct {
	bkcache.RefMetadata
}

type CachedChange added in v0.16.3

type CachedChange = cache.Result[string, *ChangeWithStat]

type ChangeFunc

type ChangeFunc func(kind ChangeKind, path string, lowerStat, upperStat *types.Stat) error

type ChangeKind

type ChangeKind = fsutil.ChangeKind
const (
	ChangeKindAdd    ChangeKind = fsutil.ChangeKindAdd
	ChangeKindModify ChangeKind = fsutil.ChangeKindModify
	ChangeKindDelete ChangeKind = fsutil.ChangeKindDelete
	ChangeKindNone   ChangeKind = fsutil.ChangeKindDelete + 1
)

type ChangeWithStat

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

type ErrConflict

type ErrConflict struct {
	Path      string
	FieldName string
	OldVal    string
	NewVal    string
}

func (*ErrConflict) Error

func (e *ErrConflict) Error() string

type HashedStatInfo

type HashedStatInfo struct {
	StatInfo
	// contains filtered or unexported fields
}

func (*HashedStatInfo) Digest

func (s *HashedStatInfo) Digest() digest.Digest

type Opt

type Opt struct {
	CacheAccessor bkcache.Accessor
}

type ReadFS

type ReadFS interface {
	WalkFS
	ReadFile(ctx context.Context, path string) (io.ReadCloser, error)
}

type StatInfo

type StatInfo struct {
	*types.Stat
}

func (*StatInfo) Info

func (s *StatInfo) Info() (fs.FileInfo, error)

func (*StatInfo) IsDir

func (s *StatInfo) IsDir() bool

func (*StatInfo) ModTime

func (s *StatInfo) ModTime() time.Time

func (*StatInfo) Mode

func (s *StatInfo) Mode() os.FileMode

func (*StatInfo) Name

func (s *StatInfo) Name() string

func (*StatInfo) Size

func (s *StatInfo) Size() int64

func (*StatInfo) Sys

func (s *StatInfo) Sys() interface{}

func (*StatInfo) Type

func (s *StatInfo) Type() fs.FileMode

type WalkFS

type WalkFS interface {
	Walk(ctx context.Context, path string, walkFn fs.WalkDirFunc) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳