resources

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 16 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

func InitBackoff

func InitBackoff() backoff.BackOff

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 table.Columns, rows []value.Values, setErr bool) *FakeMgmt

func SuccessfulFakeResources

func SuccessfulFakeResources() *FakeMgmt

func (*FakeMgmt) Mgmt

func (f *FakeMgmt) Mgmt(_ context.Context, db string, query kusto.Stmt, _ ...kusto.MgmtOption) (*kusto.RowIterator, error)

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) Resources

func (m *Manager) Resources() (Ingestion, error)

Resources returns information about the ingestion resources. This will used cached information instead of fetching from source.

type URI

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

URI represents a resource URI for an ingestion command.

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 that will be ingested???

func (*URI) ObjectType

func (u *URI) ObjectType() string

ObjectType returns the type of object that will be ingested: queue, blob or table.

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