describer

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DescribeResourceJobFailed    string = "FAILED"
	DescribeResourceJobSucceeded string = "SUCCEEDED"
)
View Source
const (
	MinBufferSize   int           = 10
	MaxBufferSize   int           = 100
	ChannelSize     int           = 1000
	BufferEmptyRate time.Duration = 5 * time.Second
)

Variables

This section is empty.

Functions

func DescribeHandler

func DescribeHandler(ctx context.Context, logger *zap.Logger, _ TriggeredBy, input describepkg.DescribeWorkerInput) error

DescribeHandler TriggeredBy is not used for now but might be relevant in the future

func Do

func Do(ctx context.Context,
	vlt vault.VaultSourceConfig,
	logger *zap.Logger,
	job describe2.DescribeJob,
	grpcEndpoint string,
	describeDeliverToken string,
	ingestionPipelineEndpoint string,
	useOpenSearch bool) (resourceIDs []string, err error)

func GetResourceType

func GetResourceType(resourceType string) (*model.ResourceType, error)

func GetResourceTypesMap

func GetResourceTypesMap() map[string]model.ResourceType

func GetResources

func GetResources(
	ctx context.Context,
	logger *zap.Logger,
	resourceType string,
	triggerType enums.DescribeTriggerType,
	cfg configs.IntegrationCredentials,
	additionalParameters map[string]string,
	stream *model.StreamSender,
) error

func GetSingleResource added in v0.4.0

func GetSingleResource(
	ctx context.Context,
	logger *zap.Logger,
	resourceType string,
	triggerType enums.DescribeTriggerType,
	cfg configs.IntegrationCredentials,
	additionalParameters map[string]string,
	resourceId string,
	stream *model.StreamSender,
) error

func ListResourceTypes

func ListResourceTypes() []string

Types

type Error

type Error struct {
	ErrCode string
	// contains filtered or unexported fields
}

type ResourceSender

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

func NewResourceSender

func NewResourceSender(grpcEndpoint, ingestionPipelineEndpoint string, describeToken string, jobID uint, useOpenSearch bool, logger *zap.Logger) (*ResourceSender, error)

func (*ResourceSender) Connect

func (s *ResourceSender) Connect() error

func (*ResourceSender) Finish

func (s *ResourceSender) Finish()

func (*ResourceSender) GetResourceIDs

func (s *ResourceSender) GetResourceIDs() []string

func (*ResourceSender) ResourceHandler

func (s *ResourceSender) ResourceHandler()

func (*ResourceSender) Send

func (s *ResourceSender) Send(resource *es.Resource)

type TriggeredBy

type TriggeredBy string
const (
	TriggeredByAWSLambda     TriggeredBy = "aws-lambda"
	TriggeredByAzureFunction TriggeredBy = "azure-function"
	TriggeredByLocal         TriggeredBy = "local"
)

Jump to

Keyboard shortcuts

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