NatsFile

package
v0.0.0-...-2d867ee Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NatsFile

type NatsFile struct {
	NC *nats.Conn

	FileManager  *FM.FileManager
	FileStreamer *FileStreamer.FileStreamer
	RNode        *PS.RegisteredNode
	// contains filtered or unexported fields
}

NatsFile will broadcast file system services to the NATS server.

func NewNatsFile

func NewNatsFile() (nf *NatsFile, err error)

NewNatsFile Use this function to create a new NatsFile Object.

func (*NatsFile) NotifyDone

func (nf *NatsFile) NotifyDone()

NotifyDone will request a Done Status be applied to the server

func (*NatsFile) PackageResponse

func (nf *NatsFile) PackageResponse(success bool, message string, subject string)

PackageResponse will respond to the subject with a positive message

func (*NatsFile) ProgressUpdate

func (nf *NatsFile) ProgressUpdate(file *FS.File, currentLine uint64, readBytes uint64)

ProgressUpdate is part of the adapter to send to the File Streamer

func (*NatsFile) RequestLines

func (nf *NatsFile) RequestLines(msg *nats.Msg)

RequestLines will return the requested amount of lines over NATS

func (*NatsFile) SendStatus

func (nf *NatsFile) SendStatus(status string)

SendStatus will fire a status event to the play status

func (*NatsFile) SubscribeSubjects

func (nf *NatsFile) SubscribeSubjects() error

SubscribeSubjects will subscribe NatsFile to different NATS Subjects

Jump to

Keyboard shortcuts

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