resources

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

Documentation

Overview

Package resources contains objects that are used to gather information about Kusto resources that are used during various ingestion methods.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeMgmt added in v0.6.0

type FakeMgmt struct {
	DBEqual    string
	QueryEqual string
	// contains filtered or unexported fields
}

func FakeResources added in v0.6.0

func FakeResources(rows []value.Values, setErr bool) *FakeMgmt

func NewFakeMgmt added in v0.6.0

func NewFakeMgmt(columns table.Columns, rows []value.Values, setErr bool) *FakeMgmt

func SuccessfulFakeResources added in v0.6.0

func SuccessfulFakeResources() *FakeMgmt

func (*FakeMgmt) Mgmt added in v0.6.0

func (*FakeMgmt) SetDBEquals added in v0.6.0

func (f *FakeMgmt) SetDBEquals(s string) *FakeMgmt

func (*FakeMgmt) SetMgmtErr added in v0.6.0

func (f *FakeMgmt) SetMgmtErr() *FakeMgmt

func (*FakeMgmt) SetQueryEquals added in v0.6.0

func (f *FakeMgmt) SetQueryEquals(s string) *FakeMgmt

type FsMock added in v0.6.0

type FsMock struct {
	OnLocal  func(ctx context.Context, from string, props properties.All) error
	OnReader func(ctx context.Context, reader io.Reader, props properties.All) (string, error)
	OnBlob   func(ctx context.Context, from string, fileSize int64, props properties.All) error
}

func (FsMock) Blob added in v0.6.0

func (f FsMock) Blob(ctx context.Context, from string, fileSize int64, props properties.All) error

func (FsMock) Close added in v0.7.0

func (f FsMock) Close() error

func (FsMock) Local added in v0.6.0

func (f FsMock) Local(ctx context.Context, from string, props properties.All) error

func (FsMock) Reader added in v0.6.0

func (f FsMock) Reader(ctx context.Context, reader io.Reader, props properties.All) (string, error)

type Ingestion

type Ingestion struct {
	// Queues contains URIs for Queue resources.
	Queues []*URI
	// Containers has URIs for blob resources.
	Containers []*URI
	// Tables contains URIs for table resources.
	Tables []*URI
}

Ingestion holds information about Ingestion resources.

type Manager

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

Manager manages Kusto resources.

func New

func New(client mgmter) (*Manager, error)

New is the constructor for Manager.

func (*Manager) AuthContext

func (m *Manager) AuthContext(ctx context.Context) (string, error)

AuthContext returns a string representing the authorization context. This auth token is a temporary token that can be used to write a message via ingestion. This is different than the ADAL token.

func (*Manager) Close

func (m *Manager) Close()

Close closes the manager. This stops any token refreshes.

func (*Manager) GetRankedStorageContainers added in v0.15.1

func (m *Manager) GetRankedStorageContainers() ([]*URI, error)

Get ranked containers

func (*Manager) GetRankedStorageQueues added in v0.15.1

func (m *Manager) GetRankedStorageQueues() ([]*URI, error)

get ranked queues

func (*Manager) GetTables added in v0.15.1

func (m *Manager) GetTables() ([]*URI, error)

func (*Manager) ReportStorageResourceResult added in v0.15.1

func (m *Manager) ReportStorageResourceResult(accountName string, success bool)

Report storage account resource usage results.

type RankedStorageAccount added in v0.15.1

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

type RankedStorageAccountSet added in v0.15.1

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

type StorageAccountStats added in v0.15.1

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

type URI

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

URI represents a resource URI for an ingestion command.

func Parse added in v0.14.0

func Parse(resourceUri string) (*URI, error)

Parse parses a string representing a Kutso resource URI.

func (*URI) Account

func (u *URI) Account() string

Account is the Azure storage account that will be used.

func (*URI) ObjectName

func (u *URI) ObjectName() string

ObjectName returns the object name of the resource, i.e container name.

func (*URI) SAS

func (u *URI) SAS() url.Values

SAS is shared access signature used to access Azure storage. https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview

func (*URI) String

func (u *URI) String() string

String implements fmt.Stringer.

func (*URI) URL

func (u *URI) URL() *url.URL

URL returns the internal *url.URL object.

Jump to

Keyboard shortcuts

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