Documentation ¶
Index ¶
- Variables
- func CopyPayloadInputsLocally(payload ModelPayload, localRoot string) error
- func DownloadObject(resource ResourceInfo) ([]byte, error)
- func InitConfig(cfg Config) error
- func InitConfigFromEnv() error
- func InitConfigFromPath(configPath string) error
- func Log(message Message)
- func SetLogLevel(logLevel Level)
- func UpLoadFile(resource ResourceInfo, fileBytes []byte) error
- type AwsConfig
- type Config
- type EventConfiguration
- type FileData
- type GlobalConfig
- type GlobalLogger
- type InternalPathData
- type Level
- type Message
- type Model
- type ModelIdentifier
- type ModelManifest
- type ModelPayload
- type Plugin
- type ResourceInfo
- type ResourcedFileData
- type ResourcedInternalPathData
- type SeedSet
- type Status
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var PluginConfig = GlobalConfig{ HasInitialized: false, }
Functions ¶
func CopyPayloadInputsLocally ¶
func CopyPayloadInputsLocally(payload ModelPayload, localRoot string) error
func DownloadObject ¶
func DownloadObject(resource ResourceInfo) ([]byte, error)
func InitConfig ¶
func InitConfigFromEnv ¶
func InitConfigFromEnv() error
func InitConfigFromPath ¶
func SetLogLevel ¶
func SetLogLevel(logLevel Level)
Types ¶
type AwsConfig ¶
type AwsConfig struct { Name string `json:"aws_config_name,omitempty"` IsPrimary bool `json:"is_primary_config"` //where payloads would get stored? AWS_ACCESS_KEY_ID string `json:"aws_access_key_id"` AWS_SECRET_ACCESS_KEY string `json:"aws_secret_access_key_id"` AWS_REGION string `json:"aws_region"` AWS_BUCKET string `json:"aws_bucket"` S3_MOCK bool `json:"aws_mock,omitempty"` //for testing with minio S3_ENDPOINT string `json:"aws_endpoint,omitempty"` //for testing with minio S3_DISABLE_SSL bool `json:"aws_disable_ssl,omitempty"` //for testing with minio S3_FORCE_PATH_STYLE bool `json:"aws_force_path_style,omitempty"` //for testing with minio }
type Config ¶
type Config struct {
AwsConfigs []AwsConfig `json:"aws_configs"`
}
func (Config) PrimaryConfig ¶
type EventConfiguration ¶
type EventConfiguration struct { EventNumber int `json:"event_number"` RealizationNumber int `json:"realization_number"` Seeds []SeedSet `json:"seeds"` }
func LoadEventConfiguration ¶
func LoadEventConfiguration(resourceInfo ResourceInfo) (EventConfiguration, error)
type FileData ¶
type FileData struct { //Id is an internal element generated to identify any data element. Id string `json:"id,omitempty" yaml:"id,omitempty"` //FileName describes the name of the file that needs to be input or output. FileName string `json:"filename" yaml:"filename"` //InternalPaths (optional) describe the specific information in the file (e.g. /a/b/c/d/e/f for dss) InternalPaths []InternalPathData `json:"internal_paths,omitempty" yaml:"internal_paths,omitempty"` }
can use this info to allow a user to link model manifests together.
type GlobalConfig ¶
type GlobalLogger ¶
type GlobalLogger struct {
Level //i believe this will be global to the container each container having its own possible level (and wat having its own level too.)
}
type InternalPathData ¶
type InternalPathData struct { //Id is an internal element generated to identify any data element. Id string `json:"id,omitempty" yaml:"id,omitempty"` //PathName describes the internal path location to the data needed or produced. PathName string `json:"pathname" yaml:"pathname"` //Type (optional) describes the type of information at the path (e.g. flow time-series) Type string `json:"type,omitempty" yaml:"type,omitempty"` }
type ModelIdentifier ¶
type ModelIdentifier struct { Model Files []ResourcedFileData `json:"files,omitempty" yaml:"files,omitempty"` }
ModelIdentifier a model identifier describes a model at a high level, the name, a given alternative (simulation, plan, etc.) and the associated files that define the geometry (optional)
type ModelManifest ¶
type ModelManifest struct { ManifestID string `json:"manifest_id" yaml:"manifest_id"` Plugin `json:"plugin" yaml:"plugin"` ModelIdentifier `json:"model_identifier" yaml:"model_identifier"` Inputs []FileData `json:"inputs" yaml:"inputs"` Outputs []FileData `json:"outputs" yaml:"outputs"` }
ModelManifest
type ModelPayload ¶
type ModelPayload struct { Id string `json:"payload_id" yaml:"payload_id"` Model EventIndex int `json:"event_index" yaml:"event_index"` Inputs []ResourcedFileData `json:"inputs" yaml:"inputs"` Outputs []ResourcedFileData `json:"outputs" yaml:"outputs"` }
Payload
func LoadPayload ¶
func LoadPayload(filepath string) (ModelPayload, error)
type Plugin ¶
type Plugin struct { Name string `json:"name" yaml:"name"` ImageAndTag string `json:"image_and_tag" yaml:"image_and_tag"` Command []string `json:"command" yaml:"command"` }
Plugin a plugin is defined by its name an image and tag and the command necessary to call it to run a payload.
type ResourceInfo ¶
type ResourceInfo struct { Store Store `json:"store" yaml:"store"` // s3, azure, local, queue? Root string `json:"root" yaml:"root"` // bucket, rootdir, queue? Path string `json:"path,omitempty" yaml:"path,omitempty"` // path to object }
ResourceInfo defines the elements to resolve to a file object, what store it uses, the root (or bucket) and then the path to the asset.
type ResourcedFileData ¶
type ResourcedFileData struct { //Id is an internal element generated to identify any data element. Id string `json:"id,omitempty" yaml:"id,omitempty"` //FileName describes the name of the file that needs to be input or output. FileName string `json:"filename" yaml:"filename"` ResourceInfo `json:"resource_info" yaml:"resource_info"` InternalPaths []ResourcedInternalPathData `json:"internal_paths,omitempty" yaml:"internal_paths,omitempty"` }
ResourcedFileData
type ResourcedInternalPathData ¶
type ResourcedInternalPathData struct { //PathName describes the internal path location to the data needed or produced. PathName string `json:"pathname" yaml:"pathname"` FileName string `json:"filename,omitempty" yaml:"filename,omitempty"` InternalPath string `json:"internal_path,omitempty" yaml:"internal_path,omitempty"` ResourceInfo `json:"resource_info" yaml:"resource_info"` }
Click to show internal directories.
Click to hide internal directories.