Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Follower ¶
type Follower struct {
// contains filtered or unexported fields
}
Follower is a Lustre Changelog follower. It provides a work-around for the broken CHANGELOG_FLAG_FOLLOW functionality in liblustreapi. If that is ever fixed, then it should be possible to just call NextRecord() in a blocking loop directly on the handle.
func CreateFollower ¶
CreateFollower takes a MDT name and returns a Follower-wrapped Handle
func FollowHandle ¶
FollowHandle takes a Handle and wraps it with a Follower object.
func (*Follower) Close ¶
func (f *Follower) Close()
Close signals that the Follower should close the wrapped Handle and stop processing records.
func (*Follower) Follow ¶
func (f *Follower) Follow()
Follow opens the wrapped Handle at the first available index.
func (*Follower) FollowFrom ¶
FollowFrom opens the wrapped Handle at the specified index.
func (*Follower) NextRecord ¶
NextRecord blocks until the next record is available or an error was encountered by the follower goroutine.
type Handle ¶
type Handle interface { Open(bool) error OpenAt(int64, bool) error Close() error NextRecord() (Record, error) Clear(string, int64) error String() string }
Handle represents an interface to a Lustre Changelog
func CreateHandle ¶
CreateHandle returns a Handle for accessing Changelog records on a given MDT.
type Record ¶
type Record interface { Index() int64 Name() string Type() string TypeCode() uint Time() time.Time TargetFid() *lustre.Fid ParentFid() *lustre.Fid SourceName() string SourceFid() *lustre.Fid SourceParentFid() *lustre.Fid IsRename() bool IsLastRename() (bool, bool) IsLastUnlink() (bool, bool) JobID() string String() string }
Record represents a Lustre Changelog record
type RecordIterator ¶
RecordIterator iterates over Records