Documentation ¶
Index ¶
- Constants
- Variables
- func ComputeTrialActorServiceName(actor *TrialActor) string
- func GetProjectConfigPathFromProjectPath(projectPath string) (string, error)
- func ProtoAliasFromProtoPath(path string) string
- type ActorClass
- type ActorImplementation
- type ActorService
- type Application
- type ApplicationDetails
- type ComponentsConfigurations
- type DeltaApplyFn
- type DockerRegistry
- type Environment
- type Import
- type LogEntry
- type Observation
- type ProjectConfig
- type RegistryConfiguration
- type SearchLogsResult
- type ServiceStatus
- type Trial
- type TrialActor
- type TrialParams
Constants ¶
const SettingsFilenameJs = "CogSettings.ts"
const SettingsFilenamePy = "cog_settings.py"
Variables ¶
var ClientActorServiceEndpoint = ClientServiceName
ClientActorServiceEndpoint is the endpoint used for client actors
var ClientServiceName = "client"
ClientServiceName is the name used for client service
var EnvironmentServiceName = "environment"
EnvironmentServiceName is the name used for environment service
var ValidProjectFilenames = []string{
"cogment.yaml",
"cogment.yml",
}
Functions ¶
func ComputeTrialActorServiceName ¶
func ComputeTrialActorServiceName(actor *TrialActor) string
ComputeTrialActorServiceName computes the service name for a given trial actor
func GetProjectConfigPathFromProjectPath ¶
GetProjectConfigPathFromProjectPath returns the path to an existing project configuration file in a given directory
func ProtoAliasFromProtoPath ¶
ProtoAliasFromProtoPath convert the path to a .proto file to an unique alias like path/to/data.proto => path_to_data_pb
Types ¶
type ActorClass ¶
type ActorClass struct { Name string Action struct { Space string } Observation *Observation ConfigType string `yaml:"config_type"` }
type ActorImplementation ¶
ActorImplementation represents an actor implementation:
- its unique name, and
- the actor classes it implements.
type ActorService ¶
type ActorService struct { Name string Endpoint string Implementations []ActorImplementation }
ActorService represents an actor service:
- its unique name,
- its endpoint, and
- the actor implementations it hosts
type Application ¶
type ApplicationDetails ¶
type ComponentsConfigurations ¶
type ComponentsConfigurations struct { Orchestrator helper.VersionInfo Python helper.VersionInfo Metrics helper.VersionInfo Dashboard helper.VersionInfo }
ComponentsConfigurations describes the configuration of the cogment components
type DeltaApplyFn ¶
type DockerRegistry ¶
type Environment ¶
type Environment struct {
ConfigType string `yaml:"config_type"`
}
type Observation ¶
type Observation struct { Space string Delta string DeltaApplyFn *DeltaApplyFn `yaml:"delta_apply_fn"` }
type ProjectConfig ¶
type ProjectConfig struct { ActorClasses []*ActorClass `yaml:"actor_classes"` CliVersion string Commands map[string]string Components ComponentsConfigurations Environment *Environment Import Import ProjectConfigPath string ProjectName string Trial *Trial TrialParams *TrialParams `yaml:"trial_params"` Typescript bool WebClient bool }
ProjectConfig describes the root configuration of a cogment app, as loaded from a `cogment.yaml` file.
func CreateDefaultProjectConfig ¶
func CreateDefaultProjectConfig() (*ProjectConfig, error)
CreateDefaultProjectConfig creates a project with the defaults defined in "/api/default_cogment.yaml"
func CreateProjectConfigFromProjectPath ¶
func CreateProjectConfigFromProjectPath(projectPath string) (*ProjectConfig, error)
CreateProjectConfigFromProjectPath creates a new instance of ProjectConfig from a given directory. It will lookup `cogment.yaml`, `cogment.yml`
func CreateProjectConfigFromYaml ¶
func CreateProjectConfigFromYaml(filename string) (*ProjectConfig, error)
CreateProjectConfigFromYaml creates a new instance of ProjectConfig from a given `cogment.yaml` file
func ExtendDefaultProjectConfig ¶
func ExtendDefaultProjectConfig(config *ProjectConfig) (*ProjectConfig, error)
ExtendDefaultProjectConfig extends the default project configuration with the given config
the given config is left untouched.
func (*ProjectConfig) CountActorsByActorClass ¶
func (p *ProjectConfig) CountActorsByActorClass(name string) (countAi, countHuman int)
func (*ProjectConfig) ListClientActorImplementations ¶
func (p *ProjectConfig) ListClientActorImplementations() []ActorImplementation
ListClientActorImplementations lists the client actor implementations from the default trial
func (*ProjectConfig) ListServiceActorServices ¶
func (p *ProjectConfig) ListServiceActorServices() []ActorService
ListServiceActorServices lists the service actor services used by the default trial
type RegistryConfiguration ¶
type SearchLogsResult ¶
type ServiceStatus ¶
type TrialActor ¶
type TrialParams ¶
type TrialParams struct { Environment struct { Endpoint string Config map[string]interface{} } Actors []*TrialActor }