joda

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyze

type Analyze struct {
	Children     []Analyze `json:"Children"`
	CountTotal   uint64    `json:"Count_Total"`
	CountObject  uint64    `json:"Count_Object"`
	MinMember    *uint64   `json:"Min_Member"`
	MaxMember    *uint64   `json:"Max_Member"`
	CountArray   uint64    `json:"Count_Array"`
	MinSize      *uint64   `json:"Min_Size"`
	MaxSize      *uint64   `json:"Max_Size"`
	CountNull    uint64    `json:"Count_Null"`
	CountBoolean uint64    `json:"Count_Boolean"`
	CountTrue    uint64    `json:"Count_True"`
	CountFalse   uint64    `json:"Count_False"`
	CountString  uint64    `json:"Count_String"`
	CountInt     uint64    `json:"Count_Int"`
	MinInt       *int64    `json:"Min_Int"`
	MaxInt       *int64    `json:"Max_Int"`
	CountFloat   uint64    `json:"Count_Float"`
	MinFloat     *float64  `json:"Min_Float"`
	MaxFloat     *float64  `json:"Max_Float"`
	CountNumber  uint64    `json:"Count_Number"`
	Key          string    `json:"Key"`
}

Analyze result

type Benchmark

type Benchmark struct {
	Query                      string          `json:"Query"`
	Time                       int             `json:"Time"`
	PrettyTime                 string          `json:"Pretty Time"`
	Threads                    int             `json:"Threads"`
	Runtime                    Runtime         `json:"Runtime"`
	ResultSize                 int             `json:"Result Size"`
	Container                  int             `json:"#Container"`
	RAMProc                    int             `json:"RAM Proc"`
	PrettyRAMProc              string          `json:"Pretty RAM Proc"`
	EstimatedStorageSize       int             `json:"Estimated Storage Size"`
	PrettyEstimatedStorageSize string          `json:"Pretty Estimated Storage Size"`
	System                     BenchmarkSystem `json:"System"`
}

type BenchmarkSystem

type BenchmarkSystem struct {
	Version   string `json:"Version"`
	Build     string `json:"Build"`
	BuildTime string `json:"Build Time"`
}

type Joda

type Joda struct{}

func (Joda) Comment

func (Joda) Comment(comment string) string

func (Joda) Header

func (Joda) Header() string

func (Joda) Name

func (Joda) Name() string

func (Joda) QueryDelimiter

func (Joda) QueryDelimiter() string

func (Joda) ShortName

func (Joda) ShortName() string

func (Joda) SupportsIntermediate

func (Joda) SupportsIntermediate() bool

func (Joda) Translate

func (Joda) Translate(query query.Query) (query_string string)

type JodaConnection

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

A connection to a JODA server. Can be used to interact with and query the JODA instance.

func Connect

func Connect(host string) (*JodaConnection, error)

Attempts to connect to a JODA instance

func (*JodaConnection) AnalyzeDataset

func (con *JodaConnection) AnalyzeDataset(source string) (dataset.DataSet, error)

func (*JodaConnection) AnalyzeSource

func (con *JodaConnection) AnalyzeSource(name string) (*Analyze, error)

Analyzes a source and returns the result

func (*JodaConnection) GetDatasets

func (con *JodaConnection) GetDatasets(sets []string) ([]dataset.DataSet, error)

func (*JodaConnection) HandleResult

func (con *JodaConnection) HandleResult(query_result Query) (*Result, error)

Handles a Query return and retrieves the result if the query was successful. The result is then removed from the backend

func (*JodaConnection) Query

func (con *JodaConnection) Query(query string) (*Query, error)

Queries the system and returns the answer. The actual result set of the query has to be extracted with the "Result function"

func (*JodaConnection) RemoveResult

func (con *JodaConnection) RemoveResult(result Query) error

Removes the result from the system

func (*JodaConnection) RemoveSource

func (con *JodaConnection) RemoveSource(name string) error

Removes a source from the system

func (*JodaConnection) Result

func (con *JodaConnection) Result(result_id int) (*Result, error)

Retrieves the result of a query

func (*JodaConnection) Sources

func (con *JodaConnection) Sources() (*Sources, error)

Returns all stored sources of the server

func (*JodaConnection) System

func (con *JodaConnection) System() (*System, error)

Returns system information of the JODA server

type Query

type Query struct {
	Success   int       `json:"success"`
	Size      int       `json:"size"`
	Benchmark Benchmark `json:"benchmark"`
	Error     string    `json:"error"`
}

Response to the /query endpoint of the JODA server

type Result

type Result struct {
	Result []interface{} `json:"result"`
}

Response to the /result endpoint of the JODA server Each row is a row of the JSOn result of the query. Hence the structure of the rows depends on the query.

type Runtime

type Runtime struct {
	Threads    []Threads `json:"Threads"`
	Aggmerge   float64   `json:"AggMerge"`
	Store      float64   `json:"Store"`
	Evaluation float64   `json:"Evaluation"`
	Query      float64   `json:"Query"`
}

type Sources

type Sources []struct {
	Name      string `json:"name"`
	Documents int    `json:"documents"`
	Container int    `json:"container"`
	Memory    int    `json:"memory"`
	MemoryStr string `json:"memory-str"`
}

Response to the /sources endpoint of the JODA server

type System

type System struct {
	Memory  SystemMemory  `json:"memory"`
	Version SystemVersion `json:"version"`
	Host    SystemHost    `json:"host"`
}

Response to the /system endpoint of the JODA server

type SystemHost

type SystemHost struct {
	Kernel string `json:"kernel"`
	Os     string `json:"os"`
}

type SystemMemory

type SystemMemory struct {
	Total            int64 `json:"total"`
	Used             int64 `json:"used"`
	Joda             int   `json:"joda"`
	AllowedMemory    int64 `json:"allowed_memory"`
	CalculatedMemory int   `json:"calculated_memory"`
}

type SystemVersion

type SystemVersion struct {
	Version   string `json:"version"`
	API       int    `json:"api"`
	Commit    string `json:"commit"`
	BuildTime string `json:"build-time"`
}

type Threads

type Threads struct {
	Aggregate float64 `json:"Aggregate,omitempty"`
}

Jump to

Keyboard shortcuts

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