descriptors

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FinishedFragmentMessage added in v0.0.10

type FinishedFragmentMessage struct {
	FragmentID IterumID `json:"fragment_id"`
}

FinishedFragmentMessage contains an id of a fragment that is no longer needed by the transformation step. Meaning we can acknowledge this fragment

func (*FinishedFragmentMessage) Deserialize added in v0.0.10

func (ffm *FinishedFragmentMessage) Deserialize(data []byte) (err error)

Deserialize tries to decode a json encoded byte array into `ffm`. Errors on failure

func (*FinishedFragmentMessage) Serialize added in v0.0.10

func (ffm *FinishedFragmentMessage) Serialize() (data []byte, err error)

Serialize tries to transform `ffm` into a json encoded bytearray. Errors on failure

type IterumID added in v0.0.10

type IterumID string

IterumID is an id that belongs to a fragment and used to correlate fragments

func NewIterumID added in v0.0.10

func NewIterumID() IterumID

NewIterumID generates a new IterumID of given length

func (IterumID) IsValid added in v0.0.10

func (iid IterumID) IsValid() bool

IsValid checks whether some string parsed as IterumID is a valid one

func (IterumID) String added in v0.0.10

func (iid IterumID) String() string

type KillMessage

type KillMessage struct {
	Status string `json:"status"`
}

KillMessage is a message noting that either the sidecar or the program should stop a KillMessage indicates the final message on a socket after which the connection can be broken

func NewKillMessage

func NewKillMessage() KillMessage

NewKillMessage creates a new default instance of KillMessage

func (*KillMessage) Deserialize

func (km *KillMessage) Deserialize(data []byte) (err error)

Deserialize tries to decode a json encoded byte array into `km`. Errors on failure

func (*KillMessage) Serialize

func (km *KillMessage) Serialize() (data []byte, err error)

Serialize tries to transform `km` into a json encoded bytearray. Errors on failure

type LocalFileDesc

type LocalFileDesc struct {
	Name      string `json:"name"` // Original name as stored in the idv repository
	LocalPath string `json:"path"` // Local path to file
}

LocalFileDesc is a description of an iterum data file downloaded and stored somewhere on the local volume

func (LocalFileDesc) ToRemotePath

func (lfd LocalFileDesc) ToRemotePath(prefix string) string

ToRemotePath converts a LocalFileDesc into a path on the remote Minio storage where it is located

type LocalFragmentDesc

type LocalFragmentDesc struct {
	Files    []LocalFileDesc `json:"files"`
	Metadata LocalMetadata   `json:"metadata"` // Additional information on this fragment
}

LocalFragmentDesc is a structure describing an iterum fragment and how it is stored on the program's machine's local volume

func (*LocalFragmentDesc) Deserialize

func (lf *LocalFragmentDesc) Deserialize(data []byte) (err error)

Deserialize tries to decode a json encoded byte array into `f`. Errors on failure

func (*LocalFragmentDesc) Serialize

func (lf *LocalFragmentDesc) Serialize() (data []byte, err error)

Serialize tries to transform `f` into a json encoded bytearray. Errors on failure

type LocalMetadata added in v0.0.4

type LocalMetadata struct {
	FragmentID    IterumID               `json:"fragment_id"`
	Predecessors  []IterumID             `json:"predecessors"`
	OutputChannel *string                `json:"output_channel,omitempty"` // Target output of a transformation step
	Custom        map[string]interface{} `json:"custom,omitempty"`         // Custom metadata added by and for the user for across transformation steps
}

LocalMetadata is a structure used in local fragment descriptions to add additional information Mostly used for Iterum internal functioning such as routing

func (LocalMetadata) Validate added in v0.0.10

func (lmd LocalMetadata) Validate() (err error)

Validate checks whether a metadata struct is valid (as far as possible)

type RemoteFileDesc

type RemoteFileDesc struct {
	Name       string `json:"name"`   // Original name as stored in the idv repository
	RemotePath string `json:"path"`   // Remote path to file within MinIO
	Bucket     string `json:"bucket"` // Name of the bucket that the file is stored in
}

RemoteFileDesc is a description of a file as found in the Minio storage

func (RemoteFileDesc) ToLocalPath

func (rfd RemoteFileDesc) ToLocalPath(prefix string) string

ToLocalPath converts a RemoteFileDesc into a path on the local disk on where to store it

type RemoteFragmentDesc

type RemoteFragmentDesc struct {
	Files    []RemoteFileDesc `json:"files"`
	Metadata RemoteMetadata   `json:"metadata"` // Additional information on this fragment
}

RemoteFragmentDesc is a structure describing an iterum fragment and how it is stored on the remote minio storage

func (*RemoteFragmentDesc) Deserialize

func (rf *RemoteFragmentDesc) Deserialize(data []byte) (err error)

Deserialize tries to decode a json encoded byte array into `f`. Errors on failure

func (*RemoteFragmentDesc) Serialize

func (rf *RemoteFragmentDesc) Serialize() (data []byte, err error)

Serialize tries to transform `f` into a json encoded bytearray. Errors on failure

type RemoteMetadata added in v0.0.8

type RemoteMetadata struct {
	FragmentID   IterumID               `json:"fragment_id"`
	Predecessors []IterumID             `json:"predecessors"`
	TargetQueue  *string                `json:"target_queue,omitempty"` // TargetQueue of the message queue
	Custom       map[string]interface{} `json:"custom,omitempty"`       // Custom metadata added by and for the user for across transformation steps
}

RemoteMetadata is a structure used in remote fragment descriptions to add additional information Mostly used for Iterum internal functioning such as routing

func (RemoteMetadata) Validate added in v0.0.10

func (rmd RemoteMetadata) Validate() (err error)

Validate checks whether a metadata struct is valid (as far as possible)

Jump to

Keyboard shortcuts

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