protocol

package module
v0.0.0-...-85bf5a9 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChunkReadRequestMsgWithContext

func ChunkReadRequestMsgWithContext(ctx context.Context, conn *nats.Conn, msg *nats.Msg, log func(string, ...interface{})) (*nats.Msg, error)

func ChunkSendReplyMsgWithContext

func ChunkSendReplyMsgWithContext(ctx context.Context, conn *nats.Conn, replyto *nats.Msg, msg *nats.Msg, log func(string, ...interface{})) error

func ChunkSendRequestMsgWithContext

func ChunkSendRequestMsgWithContext(ctx context.Context, conn *nats.Conn, msg *nats.Msg, log func(string, ...interface{})) (*nats.Msg, error)

func NewRNSMsg

func NewRNSMsg(subject string) *nats.Msg

NewRNSMSG Returns a New RNS Message (for each "Transaction")

Types

type FileInfo

type FileInfo struct {
	Name string `json:"name"`
	Size int64  `json:"size"`
}

type ListOp

type ListOp struct {
	Bucket  string `json:"bucket"`
	BaseDir string `json:"base_dir"`
	SubDir  bool   `json:"sub_dir"`
}

type ListResult

type ListResult struct {
	Ok bool       `json:"ok"`
	FI []FileInfo `json:"fi"`
}

type LoadOp

type LoadOp struct {
	Bucket string `json:"bucket"`
	Dir    string `json:"dir"`
	Name   string `json:"name"`
	Length int    `json:"length"`
	Offset int64  `json:"offset"`
}

type LoadResult

type LoadResult struct {
	Ok   bool   `json:"ok"`
	Data []byte `json:"data"`
}

type MkdirOp

type MkdirOp struct {
	Bucket string `json:"bucket"`
	Dir    string `json:"dir"`
}

type MkdirResult

type MkdirResult struct {
	Ok bool `json:"ok"`
}

type NatsCommand

type NatsCommand int
const (
	NatsOpenCmd NatsCommand = iota
	NatsStatCmd
	NatsMkdirCmd
	NatsSaveCmd
	NatsListCmd
	NatsLoadCmd
	NatsRemoveCmd
)

type OpenOp

type OpenOp struct {
	Bucket string `json:"bucket"`
}

type OpenResult

type OpenResult struct {
	Ok bool `json:"ok"`
}

type RemoveOp

type RemoveOp struct {
	Bucket string `json:"bucket"`
	Dir    string `json:"dir"`
	Name   string `json:"name"`
}

type RemoveResult

type RemoveResult struct {
	Ok bool `json:"ok"`
}

type SaveOp

type SaveOp struct {
	Bucket     string `json:"bucket"`
	Dir        string `json:"dir"`
	Name       string `json:"name"`
	Filesize   int64  `json:"size"`
	PacketSize int    `json:"packet_size"`
	Offset     int64  `json:"offset"`
	Data       []byte `json:"data"`
}

type SaveResult

type SaveResult struct {
	Ok bool `json:"ok"`
}

type StatOp

type StatOp struct {
	Bucket   string `json:"bucket"`
	Filename string `json:"filename"`
}

type StatResult

type StatResult struct {
	Ok   bool   `json:"ok"`
	Size int64  `json:"size"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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