frames

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TypeDataTable is the .FrameType that indicates a Kusto DataTable.
	TypeDataTable = "DataTable"
	// TypeDataSetCompletion is the .FrameType that indicates a Kusto DataSetCompletion.
	TypeDataSetCompletion = "DataSetCompletion"
	// TypeDataSetHeader is the .FrameType that indicates a Kusto DataSetHeader.
	TypeDataSetHeader = "DataSetHeader"
	// TypeTableHeader is the .FrameType that indicates a Kusto TableHeader.
	TypeTableHeader = "TableHeader"
	// TypeTableFragment is the .FrameType that indicates a Kusto TableFragment.
	TypeTableFragment = "TableFragment"
	// TypeTableProgress is the .FrameType that indicates a Kusto TableProgress.
	TypeTableProgress = "TableProgress"
	// TypeTableCompletion is the .FrameType that indicates a Kusto TableCompletion.
	TypeTableCompletion = "TableCompletion"
)
View Source
const (
	FieldFrameType         = "FrameType"
	FieldTableID           = "TableId"
	FieldTableKind         = "TableKind"
	FieldTableName         = "TableName"
	FieldColumns           = "Columns"
	FieldRows              = "Rows"
	FieldColumnName        = "ColumnName"
	FieldColumnType        = "ColumnType"
	FieldCount             = "FieldCount"
	FieldTableFragmentType = "TableFragmentType"
	FieldTableProgress     = "TableProgress"
	FieldRowCount          = "RowCount"
)

These constants represent keys for fields when unmarshalling various JSON dicts representing Kusto frames.

Variables

This section is empty.

Functions

func Errorf

func Errorf(ctx context.Context, ch chan Frame, s string, a ...interface{})

Errorf write a frames.Error to ch with fmt.Sprint(s, a...).

Types

type Decoder

type Decoder interface {
	// Decode decodes an io.Reader representing a stream of Kusto frames into our Frame representation.
	// The type and order of frames is dependent on the REST interface version and the progressive frame settings.
	Decode(ctx context.Context, r io.ReadCloser, op errors.Op) chan Frame
}

Decoder provides a function that will decode an incoming data stream and return a channel of Frame objects.

type Error

type Error struct {
	Msg string
}

Error is not actually a Kusto frame, but is used to signal the end of a stream where we encountered an error. Error implements error.

func (Error) Error

func (e Error) Error() string

Error implements error.Error().

func (Error) IsFrame

func (Error) IsFrame()

IsFrame implements Frame.IsFrame().

type Frame

type Frame interface {
	IsFrame()
}

Frame is a type of Kusto frame as defined in the reference document.

type TableKind

type TableKind string

TableKind describes the kind of table.

const (
	// QueryProperties is a dataTable.TableKind that contains properties about the query itself.
	// The dataTable.TableName is usually ExtendedProperties.
	QueryProperties TableKind = "QueryProperties"
	// PrimaryResult is a dataTable.TableKind that contains the query information the user wants.
	// The dataTable.TableName is PrimaryResult.
	PrimaryResult TableKind = "PrimaryResult"
	// QueryCompletionInformation contains information on how long the query took.
	// The dataTable.TableName is QueryCompletionInformation.
	QueryCompletionInformation TableKind = "QueryCompletionInformation"
	QueryTraceLog              TableKind = "QueryTraceLog"
	QueryPerfLog               TableKind = "QueryPerfLog"
	QueryResult                TableKind = "QueryResult"
	TableOfContents            TableKind = "TableOfContents"
	QueryPlan                  TableKind = "QueryPlan"
	ExtendedProperties         TableKind = "@ExtendedProperties"
	UnknownTableKind           TableKind = "Unknown"
)

Directories

Path Synopsis
Package unmarshal provides decoding of Kusto row data in a frame into []value.Values representing those rows.
Package unmarshal provides decoding of Kusto row data in a frame into []value.Values representing those rows.
json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
Package json implements encoding and decoding of JSON as defined in RFC 7159.
Package v1 holds framing information for the v1 REST API.
Package v1 holds framing information for the v1 REST API.
Package v2 holds framing information for the v2 REST API.
Package v2 holds framing information for the v2 REST API.

Jump to

Keyboard shortcuts

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