v2

package
v1.0.0-preview-2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultFrameCapacity = 100

DefaultFrameCapacity is the default capacity of the channel that receives frames from the Kusto service. Lower capacity means less memory usage, but might cause the channel to block if the frames are not consumed fast enough.

View Source
const PrimaryResultTableKind = "PrimaryResult"
View Source
const QueryCompletionInformationKind = "QueryCompletionInformation"
View Source
const QueryPropertiesKind = "QueryProperties"

Variables

This section is empty.

Functions

func NewIterativeDataset

func NewIterativeDataset(ctx context.Context, r io.ReadCloser, capacity int) (query.IterativeDataset, error)

func NewIterativeTable

func NewIterativeTable(dataset query.BaseDataset, th TableHeader) (query.IterativeTable, error)

Types

type DataSetCompletion

type DataSetCompletion interface {
	HasErrors() bool
	Cancelled() bool
	OneApiErrors() []OneApiError
}

type DataSetHeader

type DataSetHeader interface {
	IsProgressive() bool
	Version() string
	IsFragmented() bool
	ErrorReportingPlacement() string
}

type DataTable

type DataTable interface {
	TableId() int
	TableKind() string
	TableName() string
	Columns() []FrameColumn
	Rows() RawRows
}

type ErrorContext

type ErrorContext struct {
	Timestamp        string `json:"timestamp"`
	ServiceAlias     string `json:"serviceAlias"`
	MachineName      string `json:"machineName"`
	ProcessName      string `json:"processName"`
	ProcessId        int    `json:"processId"`
	ThreadId         int    `json:"threadId"`
	ClientRequestId  string `json:"clientRequestId"`
	ActivityId       string `json:"activityId"`
	SubActivityId    string `json:"subActivityId"`
	ActivityType     string `json:"activityType"`
	ParentActivityId string `json:"parentActivityId"`
	ActivityStack    string `json:"activityStack"`
}

func (*ErrorContext) String

func (e *ErrorContext) String() string

type ErrorMessage

type ErrorMessage struct {
	Code        string       `json:"code"`
	Message     string       `json:"message"`
	Description string       `json:"@message"`
	Type        string       `json:"@type"`
	Context     ErrorContext `json:"@context"`
	IsPermanent bool         `json:"@permanent"`
}

func (*ErrorMessage) String

func (e *ErrorMessage) String() string

type EveryFrame

type EveryFrame struct {
	FrameTypeJson               FrameType     `json:"FrameType"`
	IsProgressiveJson           bool          `json:"IsProgressive"`
	VersionJson                 string        `json:"Version"`
	IsFragmentedJson            bool          `json:"IsFragmented"`
	ErrorReportingPlacementJson string        `json:"ErrorReportingPlacement"`
	TableIdJson                 int           `json:"TableId"`
	TableKindJson               string        `json:"TableKind"`
	TableNameJson               string        `json:"TableName"`
	ColumnsJson                 []FrameColumn `json:"Columns"`
	RowsJson                    RawRows       `json:"Rows"`
	TableFragmentTypeJson       string        `json:"TableFragmentType"`
	RowCountJson                int           `json:"RowCount"`
	OneApiErrorsJson            []OneApiError `json:"OneApiErrors"`
	HasErrorsJson               bool          `json:"HasErrors"`
	CancelledJson               bool          `json:"Cancelled"`
	TableProgressJson           float64       `json:"TableProgress"`
}

func (*EveryFrame) AsDataSetCompletion

func (f *EveryFrame) AsDataSetCompletion() DataSetCompletion

func (*EveryFrame) AsDataSetHeader

func (f *EveryFrame) AsDataSetHeader() DataSetHeader

func (*EveryFrame) AsDataTable

func (f *EveryFrame) AsDataTable() DataTable

func (*EveryFrame) AsTableCompletion

func (f *EveryFrame) AsTableCompletion() TableCompletion

func (*EveryFrame) AsTableFragment

func (f *EveryFrame) AsTableFragment() TableFragment

func (*EveryFrame) AsTableHeader

func (f *EveryFrame) AsTableHeader() TableHeader

func (*EveryFrame) AsTableProgress

func (f *EveryFrame) AsTableProgress() TableProgress

func (*EveryFrame) Cancelled

func (f *EveryFrame) Cancelled() bool

func (*EveryFrame) Columns

func (f *EveryFrame) Columns() []FrameColumn

func (*EveryFrame) ErrorReportingPlacement

func (f *EveryFrame) ErrorReportingPlacement() string

func (*EveryFrame) FrameType

func (f *EveryFrame) FrameType() FrameType

func (*EveryFrame) HasErrors

func (f *EveryFrame) HasErrors() bool

func (*EveryFrame) IsFragmented

func (f *EveryFrame) IsFragmented() bool

func (*EveryFrame) IsProgressive

func (f *EveryFrame) IsProgressive() bool

func (*EveryFrame) OneApiErrors

func (f *EveryFrame) OneApiErrors() []OneApiError

func (*EveryFrame) RowCount

func (f *EveryFrame) RowCount() int

func (*EveryFrame) Rows

func (f *EveryFrame) Rows() RawRows

func (*EveryFrame) TableFragmentType

func (f *EveryFrame) TableFragmentType() string

func (*EveryFrame) TableId

func (f *EveryFrame) TableId() int

func (*EveryFrame) TableKind

func (f *EveryFrame) TableKind() string

func (*EveryFrame) TableName

func (f *EveryFrame) TableName() string

func (*EveryFrame) TableProgress

func (f *EveryFrame) TableProgress() float64

func (*EveryFrame) Version

func (f *EveryFrame) Version() string

type FrameColumn

type FrameColumn struct {
	ColumnName string `json:"ColumnName"`
	ColumnType string `json:"ColumnType"`
}

type FrameType

type FrameType string
const (
	DataSetHeaderFrameType     FrameType = "DataSetHeader"
	DataTableFrameType         FrameType = "DataTable"
	TableHeaderFrameType       FrameType = "TableHeader"
	TableFragmentFrameType     FrameType = "TableFragment"
	TableCompletionFrameType   FrameType = "TableCompletion"
	DataSetCompletionFrameType FrameType = "DataSetCompletion"
	TableProgressFrameType     FrameType = "TableProgress"
)

type OneApiError

type OneApiError struct {
	ErrorMessage ErrorMessage `json:"error"`
}

func (*OneApiError) Error

func (e *OneApiError) Error() string

func (*OneApiError) String

func (e *OneApiError) String() string

type QueryCompletionInformation

type QueryCompletionInformation struct {
	Timestamp        time.Time
	ClientRequestId  string
	ActivityId       uuid.UUID
	SubActivityId    uuid.UUID
	ParentActivityId uuid.UUID
	Level            int
	LevelName        string
	StatusCode       int
	StatusCodeName   string
	EventType        int
	EventTypeName    string
	Payload          string
}

QueryCompletionInformation represents the query completion information table, which arrives after the last result.

func AsQueryCompletionInformation

func AsQueryCompletionInformation(table query.BaseTable) ([]QueryCompletionInformation, error)

type QueryProperties

type QueryProperties struct {
	TableId int
	Key     string
	Value   map[string]interface{}
}

QueryProperties represents the query properties table, which arrives before the first result.

func AsQueryProperties

func AsQueryProperties(table query.BaseTable) ([]QueryProperties, error)

type RawRow

type RawRow []interface{}

func NewRawRow

func NewRawRow(items ...interface{}) RawRow

type RawRows

type RawRows []RawRow

type TableCompletion

type TableCompletion interface {
	TableId() int
	RowCount() int
	OneApiErrors() []OneApiError
}

type TableFragment

type TableFragment interface {
	TableFragmentType() string
	TableId() int
	Rows() RawRows
}

type TableHeader

type TableHeader interface {
	TableId() int
	TableKind() string
	TableName() string
	Columns() []FrameColumn
}

type TableProgress

type TableProgress interface {
	TableId() int
	TableProgress() float64
}

Jump to

Keyboard shortcuts

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