Documentation ¶
Index ¶
- type Analyze
- type Benchmark
- type BenchmarkSystem
- type Joda
- type JodaConnection
- func (con *JodaConnection) AnalyzeDataset(source string) (dataset.DataSet, error)
- func (con *JodaConnection) AnalyzeSource(name string) (*Analyze, error)
- func (con *JodaConnection) GetDatasets(sets []string) ([]dataset.DataSet, error)
- func (con *JodaConnection) HandleResult(query_result Query) (*Result, error)
- func (con *JodaConnection) Query(query string) (*Query, error)
- func (con *JodaConnection) RemoveResult(result Query) error
- func (con *JodaConnection) RemoveSource(name string) error
- func (con *JodaConnection) Result(result_id int) (*Result, error)
- func (con *JodaConnection) Sources() (*Sources, error)
- func (con *JodaConnection) System() (*System, error)
- type Query
- type Result
- type Runtime
- type Sources
- type System
- type SystemHost
- type SystemMemory
- type SystemVersion
- type Threads
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 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 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