object

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

View Source
const FlagWcKeySplit = "|,,|"

Variables

This section is empty.

Functions

func SerializeUploadUnit

func SerializeUploadUnit(u interface{}) ([]byte, error)

Types

type DriverType

type DriverType string
const DtBadger DriverType = "BADGER"
const DtInMemory DriverType = "IN_MEMORY"
const DtNeo4j DriverType = "NEO4J"

type ExecuteConfig

type ExecuteConfig struct {
	// server
	Port int `json:"port"`

	// binding
	DbType        DriverType `json:"dbType"`
	Neo4jUri      string     `json:"neo4JUri"`
	Neo4jUserName string     `json:"neo4JUserName"`
	Neo4jPassword string     `json:"neo4JPassword"`
	BadgerPath    string     `json:"badgerPath"`

	// worker
	WorkerCount     int `json:"workerCount"`
	WorkerQueueSize int `json:"workerQueueSize"`

	// queue
	QueueType                 QueueType `json:"queueType"`
	KafkaAddrs                string    `json:"kafkaAddrs"`
	KafkaFuncTopic            string    `json:"kafkaFuncTopic"`
	KafkaFuncConsumerGroup    string    `json:"kafkaFuncConsumerGroup"`
	KafkaFuncCtxTopic         string    `json:"kafkaFuncCtxTopic"`
	KafkaFuncCtxConsumerGroup string    `json:"kafkaFuncCtxConsumerGroup"`
}

func DefaultExecuteConfig

func DefaultExecuteConfig() ExecuteConfig

func (*ExecuteConfig) ToJson added in v0.8.0

func (config *ExecuteConfig) ToJson() (string, error)

func (*ExecuteConfig) ToMap added in v0.8.1

func (config *ExecuteConfig) ToMap() (map[string]any, error)

type FunctionContextUploadUnit

type FunctionContextUploadUnit struct {
	WorkspaceConfig  *WorkspaceConfig          `json:"workspace"`
	FunctionContexts []*sibyl2.FunctionContext `json:"functionContext"`
}

func DeserializeFuncCtxUploadUnit

func DeserializeFuncCtxUploadUnit(data []byte) (*FunctionContextUploadUnit, error)

type FunctionUploadUnit

type FunctionUploadUnit struct {
	WorkspaceConfig *WorkspaceConfig              `json:"workspace"`
	FunctionResult  *extractor.FunctionFileResult `json:"funcResult"`
}

func DeserializeFuncUploadUnit

func DeserializeFuncUploadUnit(data []byte) (*FunctionUploadUnit, error)

type FunctionWithSignature

type FunctionWithSignature struct {
	*sibyl2.FunctionWithPath
	Signature string `json:"signature"`
}

type QueueType

type QueueType = string
const QueueTypeKafka QueueType = "KAFKA"
const QueueTypeMemory QueueType = "MEMORY"

type WorkspaceConfig

type WorkspaceConfig struct {
	RepoId  string `json:"repoId"`
	RevHash string `json:"revHash"`
}

WorkspaceConfig

as an infra lib, it will not assume what kind of repo you used.

just two fields: - repoId: unique id of your repo, no matter git or svn, even appId. - revHash: unique id of your version.

func (*WorkspaceConfig) Key

func (wc *WorkspaceConfig) Key() (string, error)

func (*WorkspaceConfig) Verify

func (wc *WorkspaceConfig) Verify() error

Jump to

Keyboard shortcuts

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