pinot

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 15 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertSearchResultToVisibilityRecord

func ConvertSearchResultToVisibilityRecord(hit []interface{}, columnNames []string, logger log.Logger) *p.InternalVisibilityWorkflowExecutionInfo

func SerializePageToken

func SerializePageToken(token *PinotVisibilityPageToken) ([]byte, error)

SerializePageToken return the token blob

Types

type GenericClient

type GenericClient interface {
	// Search API is only for supporting various List[Open/Closed]WorkflowExecutions(ByXyz).
	// Use SearchByQuery or ScanByQuery for generic purpose searching.
	Search(request *SearchRequest) (*SearchResponse, error)
	// CountByQuery is for returning the count of workflow executions that match the query
	CountByQuery(query string) (int64, error)
	GetTableName() string
}

GenericClient is a generic interface for all versions of Pinot clients

func NewPinotClient

func NewPinotClient(client *pinot.Connection, logger log.Logger, pinotConfig *config.PinotVisibilityConfig) GenericClient

type IsRecordValidFilter

type IsRecordValidFilter func(rec *p.InternalVisibilityWorkflowExecutionInfo) bool

IsRecordValidFilter is a function to filter visibility records

type PinotClient

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

func (*PinotClient) CountByQuery

func (c *PinotClient) CountByQuery(query string) (int64, error)

func (*PinotClient) GetTableName

func (c *PinotClient) GetTableName() string

func (*PinotClient) Search

func (c *PinotClient) Search(request *SearchRequest) (*SearchResponse, error)

type PinotVisibilityPageToken

type PinotVisibilityPageToken struct {
	From int
}

PinotVisibilityPageToken holds the paging token for Pinot

func DeserializePageToken

func DeserializePageToken(data []byte) (*PinotVisibilityPageToken, error)

DeserializePageToken return the structural token

func GetNextPageToken

func GetNextPageToken(token []byte) (*PinotVisibilityPageToken, error)

GetNextPageToken returns the structural token with nil handling

type SearchRequest

type SearchRequest struct {
	Query           string
	IsOpen          bool
	Filter          IsRecordValidFilter
	MaxResultWindow int
	ListRequest     *p.InternalListWorkflowExecutionsRequest
}

SearchRequest is request for Search

type SearchResponse

SearchResponse is a response to Search, SearchByQuery and ScanByQuery

type VisibilityQueryValidator

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

VisibilityQueryValidator for sql query validation

func NewPinotQueryValidator

func NewPinotQueryValidator(validSearchAttributes map[string]interface{}) *VisibilityQueryValidator

NewPinotQueryValidator create VisibilityQueryValidator

func (*VisibilityQueryValidator) ValidateQuery

func (qv *VisibilityQueryValidator) ValidateQuery(whereClause string) (string, error)

ValidateQuery validates that search attributes in the query and returns modified query.

type VisibilityRecord

type VisibilityRecord struct {
	WorkflowID    string
	RunID         string
	WorkflowType  string
	DomainID      string
	StartTime     int64
	ExecutionTime int64
	CloseTime     int64
	CloseStatus   int
	HistoryLength int64
	TaskList      string
	IsCron        bool
	NumClusters   int16
	UpdateTime    int64
	ShardID       int16
}

VisibilityRecord is a struct of doc for deserialization this is different from InternalVisibilityWorkflowExecutionInfo use this to deserialize the systemKeyMap from Pinot response

Jump to

Keyboard shortcuts

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