common

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: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName = "chronowave"
	Replica = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterInfo

type ClusterInfo interface {
	GetHostsAndLocal() ([]string, int)
}

type ConsistentFileStore

type ConsistentFileStore interface {
	BaseDir() string
	PrepareFlight(flight string) error
	RemoveFlight(flight string) error
	OnUpload(body []byte) error
	UploadToStore(flight string, fid uint64, data []byte, ips []string) []error
	SaveLocal(flight string, fid uint64, data []byte) error
	RemoveLocal(flight string, fid uint64) error
}

type FlightActionHandler

type FlightActionHandler interface {
	// UpdateSchema takes flight name, previous revision, and updated schema
	// on successful, return newly updated schema
	// upon failure, return existing schema and revision with non nil error
	UpdateFlightSchema(flight string, prev uint64, schema *codec.Schema) (*codec.Schema, error)
	ListFlights() map[string]*codec.Schema
	GetFlightSchema(flight string) (*codec.Schema, error)
	CreateFlight(flight string, schema *codec.Schema) error
	DeleteFlight(flight string) error
	PutFlightData(flight string, json []byte) (*codec.PutResult, error)
	SerializeTransientColumnEntity(flight string) (uint64, []byte)
}

Jump to

Keyboard shortcuts

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