resources

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: 19 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

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

func FakeResources

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

func NewFakeMgmt

func NewFakeMgmt(columns []v1.RawColumn, vals []value.Values, setErr bool) *FakeMgmt

func SuccessfulFakeResources

func SuccessfulFakeResources() *FakeMgmt

func (*FakeMgmt) Mgmt

func (*FakeMgmt) SetDBEquals

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

func (*FakeMgmt) SetMgmtErr

func (f *FakeMgmt) SetMgmtErr() *FakeMgmt

func (*FakeMgmt) SetQueryEquals

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

type FsMock

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

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

func (FsMock) Close

func (f FsMock) Close() error

func (FsMock) Local

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

func (FsMock) Reader

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

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

Get ranked containers

func (*Manager) GetRankedStorageQueues

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

get ranked queues

func (*Manager) GetTables

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

func (*Manager) ReportStorageResourceResult

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

Report storage account resource usage results.

type RankedStorageAccount

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

type RankedStorageAccountSet

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

type StorageAccountStats

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

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