terminal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(flight string, schema *codec.Schema, s *server.Server, jsc nats.JetStreamContext) error

Types

type EventDataMarker

type EventDataMarker uint8
const (
	SnapshotEvent EventDataMarker
	JobEvent
)

type Job

type Job struct {
	Id       uint64
	Consumer string
	NodeIP   string
	Status   JobStatus
	Time     int64
	StartSeq uint64
	EndSeq   uint64
}

type JobStatus

type JobStatus byte
const (
	Idle JobStatus
	Active
	Build
	Upload
	Done
)

type StateMatchine

type StateMatchine struct {
	LastJobID    uint64
	LastMsgSeq   uint64
	LastEventSeq uint64
	LastUpdate   time.Time
	Jobs         map[uint64]Job
}

type Terminal

type Terminal struct {
	// contains filtered or unexported fields
}

func Start

func Start(
	flight string,
	s *server.Server,
	nodeIP string,
	file common.ConsistentFileStore,
	cluster common.ClusterInfo,
) (*Terminal, error)

start terminal on local node

func (*Terminal) Delete

func (t *Terminal) Delete()

func (*Terminal) GetSchema

func (t *Terminal) GetSchema() *codec.Schema

func (*Terminal) ParseJson

func (t *Terminal) ParseJson(body []byte) ([][]byte, error)

func (*Terminal) SerializeTransientColumnEntity

func (t *Terminal) SerializeTransientColumnEntity() (uint64, []byte)

func (*Terminal) UpdateSchema

func (t *Terminal) UpdateSchema(schema *codec.Schema, prev uint64) error

Jump to

Keyboard shortcuts

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