pinot

package
v1.3.7-prerelease21 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Overview

Package pinot is a generated GoMock package.

Index

Constants

View Source
const (
	Memo = "Memo"
	Attr = "Attr"
)

Variables

This section is empty.

Functions

func ConvertSearchResultToVisibilityRecord

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

func SerializePageToken

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

SerializePageToken return the token blob

Types

type AggrResponse added in v1.2.12

type AggrResponse [][]interface{}

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)
	SearchAggr(request *SearchRequest) (AggrResponse, 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 MockGenericClient added in v1.2.9

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

MockGenericClient is a mock of GenericClient interface.

func NewMockGenericClient added in v1.2.9

func NewMockGenericClient(ctrl *gomock.Controller) *MockGenericClient

NewMockGenericClient creates a new mock instance.

func (*MockGenericClient) CountByQuery added in v1.2.9

func (m *MockGenericClient) CountByQuery(query string) (int64, error)

CountByQuery mocks base method.

func (*MockGenericClient) EXPECT added in v1.2.9

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGenericClient) GetTableName added in v1.2.9

func (m *MockGenericClient) GetTableName() string

GetTableName mocks base method.

func (*MockGenericClient) Search added in v1.2.9

func (m *MockGenericClient) Search(request *SearchRequest) (*SearchResponse, error)

Search mocks base method.

func (*MockGenericClient) SearchAggr added in v1.2.12

func (m *MockGenericClient) SearchAggr(request *SearchRequest) (AggrResponse, error)

SearchAggr mocks base method.

type MockGenericClientMockRecorder added in v1.2.9

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

MockGenericClientMockRecorder is the mock recorder for MockGenericClient.

func (*MockGenericClientMockRecorder) CountByQuery added in v1.2.9

func (mr *MockGenericClientMockRecorder) CountByQuery(query any) *gomock.Call

CountByQuery indicates an expected call of CountByQuery.

func (*MockGenericClientMockRecorder) GetTableName added in v1.2.9

func (mr *MockGenericClientMockRecorder) GetTableName() *gomock.Call

GetTableName indicates an expected call of GetTableName.

func (*MockGenericClientMockRecorder) Search added in v1.2.9

func (mr *MockGenericClientMockRecorder) Search(request any) *gomock.Call

Search indicates an expected call of Search.

func (*MockGenericClientMockRecorder) SearchAggr added in v1.2.12

func (mr *MockGenericClientMockRecorder) SearchAggr(request any) *gomock.Call

SearchAggr indicates an expected call of SearchAggr.

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)

func (*PinotClient) SearchAggr added in v1.2.12

func (c *PinotClient) SearchAggr(request *SearchRequest) (AggrResponse, 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 dynamicproperties.MapPropertyFn, pinotOptimizedQueryColumns dynamicproperties.MapPropertyFn) *VisibilityQueryValidator

NewPinotQueryValidator create VisibilityQueryValidator

func (*VisibilityQueryValidator) IsOptimizedQueryColumn added in v1.2.18

func (qv *VisibilityQueryValidator) IsOptimizedQueryColumn(colNameStr string) bool

IsOptimizedQueryColumn return true if colNameStr is in the optimized query columns

func (*VisibilityQueryValidator) IsValidSearchAttributes added in v1.2.11

func (qv *VisibilityQueryValidator) IsValidSearchAttributes(key string) bool

IsValidSearchAttributes return true if key is registered

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
	ClusterAttributeScope string
	ClusterAttributeName  string
	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