Documentation
¶
Index ¶
- Constants
- func SerializeUploadUnit(u interface{}) ([]byte, error)
- type BindingConfigPart
- type ClazzServiceDTO
- type ClazzUploadUnit
- type DriverType
- type ExecuteConfig
- type FuncCtxServiceDTO
- type FuncTag
- type FunctionContextSlim
- type FunctionContextUploadUnit
- type FunctionServiceDTO
- type FunctionUploadUnit
- type FunctionWithTag
- type QueueConfigPart
- type QueueType
- type RevInfo
- type ServerConfigPart
- type ServerType
- type WorkerConfigPart
- type WorkspaceConfig
Constants ¶
View Source
const BodyTypeMsgpack = "application/msgpack"
Variables ¶
This section is empty.
Functions ¶
func SerializeUploadUnit ¶
Types ¶
type BindingConfigPart ¶ added in v0.9.0
type BindingConfigPart struct {
// binding
DbType DriverType `mapstructure:"dbType"`
BadgerPath string `mapstructure:"badgerPath"`
TikvAddrs string `mapstructure:"tikvAddrs"`
MongoURI string `mapstructure:"mongoUri"`
MongoDbName string `mapstructure:"mongoDbName"`
}
type ClazzServiceDTO ¶ added in v0.16.0
type ClazzServiceDTO struct {
*extractor.ClazzWithPath `bson:",inline"`
Signature string `json:"signature" bson:"signature"`
}
type ClazzUploadUnit ¶ added in v0.10.0
type ClazzUploadUnit struct {
WorkspaceConfig *WorkspaceConfig `json:"workspace"`
ClazzFileResult *extractor.ClazzFileResult `json:"clazzFileResult"`
}
func DeserializeClazzUploadUnit ¶ added in v0.10.0
func DeserializeClazzUploadUnit(data []byte) (*ClazzUploadUnit, error)
type DriverType ¶
type DriverType = string
const ( DriverTypeInMemory DriverType = "INMEM" DriverTypeBadger DriverType = "BADGER" DriverTypeTikv DriverType = "TIKV" DriverTypeMongoDB DriverType = "MONGO" FlagWcKeySplit = "|,,|" )
type ExecuteConfig ¶
type ExecuteConfig struct {
*ServerConfigPart `mapstructure:"server"`
*BindingConfigPart `mapstructure:"binding"`
*WorkerConfigPart `mapstructure:"worker"`
*QueueConfigPart `mapstructure:"queue"`
}
func DefaultExecuteConfig ¶
func DefaultExecuteConfig() ExecuteConfig
func (*ExecuteConfig) ToJson ¶ added in v0.8.0
func (config *ExecuteConfig) ToJson() (string, error)
type FuncCtxServiceDTO ¶ added in v0.16.0
type FuncCtxServiceDTO struct {
*FunctionContextSlim `bson:",inline"`
Signature string `json:"signature" bson:"signature"`
}
type FunctionContextSlim ¶ added in v0.16.0
type FunctionContextSlim struct {
*extractor.FunctionWithPath `bson:",inline"`
Calls []string `json:"calls" bson:"calls"`
ReverseCalls []string `json:"reverseCalls" bson:"reverseCalls"`
}
FunctionContextSlim instead of whole object, slim will only keep the signature
func CompressFunctionContext ¶ added in v0.16.0
func CompressFunctionContext(f *sibyl2.FunctionContext) *FunctionContextSlim
type FunctionContextUploadUnit ¶
type FunctionContextUploadUnit struct {
WorkspaceConfig *WorkspaceConfig `json:"workspace"`
FunctionContexts []*sibyl2.FunctionContext `json:"functionContext"`
}
func DeserializeFuncCtxUploadUnit ¶
func DeserializeFuncCtxUploadUnit(data []byte) (*FunctionContextUploadUnit, error)
type FunctionServiceDTO ¶ added in v0.16.0
type FunctionServiceDTO struct {
*FunctionWithTag `bson:",inline"`
Signature string `json:"signature" bson:"signature"`
}
type FunctionUploadUnit ¶
type FunctionUploadUnit struct {
WorkspaceConfig *WorkspaceConfig `json:"workspace"`
FunctionResult *extractor.FunctionFileResult `json:"funcResult"`
}
func DeserializeFuncUploadUnit ¶
func DeserializeFuncUploadUnit(data []byte) (*FunctionUploadUnit, error)
type FunctionWithTag ¶ added in v0.16.0
type FunctionWithTag struct {
*extractor.FunctionWithPath `bson:",inline"`
Tags []FuncTag `json:"tags" bson:"tags"`
}
func (*FunctionWithTag) AddTag ¶ added in v0.16.0
func (fwt *FunctionWithTag) AddTag(tag FuncTag)
type QueueConfigPart ¶ added in v0.9.0
type QueueConfigPart struct {
// queue
QueueType QueueType `mapstructure:"queueType"`
KafkaAddrs string `mapstructure:"kafkaAddrs"`
KafkaFuncTopic string `mapstructure:"kafkaFuncTopic"`
KafkaFuncConsumerGroup string `mapstructure:"kafkaFuncConsumerGroup"`
KafkaFuncCtxTopic string `mapstructure:"kafkaFuncCtxTopic"`
KafkaFuncCtxConsumerGroup string `mapstructure:"kafkaFuncCtxConsumerGroup"`
KafkaClazzTopic string `mapstructure:"kafkaClazzTopic"`
KafkaClazzConsumerGroup string `mapstructure:"kafkaClazzConsumerGroup"`
}
type QueueType ¶
type QueueType = string
const QueueTypeKafka QueueType = "KAFKA"
const QueueTypeMemory QueueType = "MEMORY"
type RevInfo ¶ added in v0.12.0
type RevInfo struct {
Hash string `json:"hash"`
CreateTime int64 `json:"createTime"`
Extras map[string]interface{} `json:"extras"`
}
func NewRevInfo ¶ added in v0.12.0
type ServerConfigPart ¶ added in v0.9.0
type ServerConfigPart struct {
// server
Port int `mapstructure:"port"`
Mode ServerType `mapstructure:"mode"`
EnableLog bool `mapstructure:"enableLog"`
}
type ServerType ¶ added in v0.9.0
type ServerType = string
const ( ServerTypeAll ServerType = "ALL" ServerTypeWorker ServerType = "WORKER" ServerTypeGateway ServerType = "GATEWAY" )
type WorkerConfigPart ¶ added in v0.9.0
type WorkspaceConfig ¶
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
Click to show internal directories.
Click to hide internal directories.