Discover Packages
github.com/Fishwaldo/restic-nats-server/protocol
package
module
Version:
v0.0.0-...-85bf5a9
Opens a new window with list of versions in this module.
Published: Oct 6, 2021
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Jump to ...
Documentation
Index
Constants
Variables
Functions
ChunkReadRequestMsgWithContext(ctx, conn, msg, log)
ChunkSendReplyMsgWithContext(ctx, conn, replyto, msg, log)
ChunkSendRequestMsgWithContext(ctx, conn, msg, log)
NewRNSMsg(subject)
Types
Source Files
Documentation
Documentation
¶
func ChunkReadRequestMsgWithContext(ctx context.Context, conn *nats.Conn, msg *nats.Msg, ...) (*nats.Msg, error)
func ChunkSendReplyMsgWithContext(ctx context.Context, conn *nats.Conn, replyto *nats.Msg, msg *nats.Msg, ...) error
func ChunkSendRequestMsgWithContext(ctx context.Context, conn *nats.Conn, msg *nats.Msg, ...) (*nats.Msg, error)
func NewRNSMsg(subject string) *nats.Msg
type FileInfo
type ListOp
type ListResult
type LoadOp
type LoadResult
type MkdirOp
type MkdirResult
type NatsCommand
type OpenOp
type OpenResult
type RemoveOp
type RemoveResult
type SaveOp
type SaveResult
type StatOp
type StatResult
func ChunkReadRequestMsgWithContext(ctx context .Context , conn *nats.Conn, msg *nats.Msg, log func(string , ...interface{})) (*nats.Msg, error )
func ChunkSendReplyMsgWithContext(ctx context .Context , conn *nats.Conn, replyto *nats.Msg, msg *nats.Msg, log func(string , ...interface{})) error
func ChunkSendRequestMsgWithContext(ctx context .Context , conn *nats.Conn, msg *nats.Msg, log func(string , ...interface{})) (*nats.Msg, error )
func NewRNSMsg(subject string ) *nats.Msg
NewRNSMSG Returns a New RNS Message (for each "Transaction")
type FileInfo struct {
Name string `json:"name"`
Size int64 `json:"size"`
}
type ListOp struct {
Bucket string `json:"bucket"`
BaseDir string `json:"base_dir"`
SubDir bool `json:"sub_dir"`
}
type ListResult struct {
Ok bool `json:"ok"`
FI []FileInfo `json:"fi"`
}
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 struct {
Ok bool `json:"ok"`
Data []byte `json:"data"`
}
type MkdirOp struct {
Bucket string `json:"bucket"`
Dir string `json:"dir"`
}
type MkdirResult struct {
Ok bool `json:"ok"`
}
const (
NatsOpenCmd NatsCommand = iota
NatsStatCmd
NatsMkdirCmd
NatsSaveCmd
NatsListCmd
NatsLoadCmd
NatsRemoveCmd
)
type OpenOp struct {
Bucket string `json:"bucket"`
}
type OpenResult struct {
Ok bool `json:"ok"`
}
type RemoveOp struct {
Bucket string `json:"bucket"`
Dir string `json:"dir"`
Name string `json:"name"`
}
type RemoveResult struct {
Ok bool `json:"ok"`
}
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 struct {
Ok bool `json:"ok"`
}
type StatOp struct {
Bucket string `json:"bucket"`
Filename string `json:"filename"`
}
type StatResult struct {
Ok bool `json:"ok"`
Size int64 `json:"size"`
Name string `json:"name"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.