Documentation ¶
Index ¶
- func ProvideCACertificateConfig(config ControlPlaneConfigModel) cert.CACertificateConfig
- func ProvideClientCATLSCertificateConfig(config WorkerConfigModel) cert.WorkerNodeCACertificateConfig
- func ProvideControlPlaneGRPCConfig(config *Config) grpc.Config
- func ProvideGRPCClientConfig(config WorkerConfigModel, clientCACertificate cert.WorkerNodeCACertificate, ...) grpc.ClientConfig
- func ProvideHTTPServerConfig(config ControlPlaneConfigModel) http.ServerConfig
- func ProvideMongoConfig(config ControlPlaneConfigModel) mongo.Config
- func ProvideTransportCertificateConfig(config ControlPlaneConfigModel) cert.TransportCertificateConfig
- func ProvideWorkerGRPCConfig(config *Config) grpc.Config
- func ProvideWorkerHTTPServerConfig(config WorkerConfigModel) httpServer.ServerConfig
- func ProvideWorkerNodeReceiverConfig(config WorkerConfigModel) grpc.WorkerNodeReceiverConfig
- func ProvideWorkerNodeTransportCertificate(config WorkerConfigModel) cert.WorkerNodeTransportCertificateConfig
- type CommonConfigModel
- type Config
- type ControlPlaneConfigModel
- type ResourceAwareDistributorConfigModel
- type TaskWatcherConfigModel
- type WorkerConfigModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProvideCACertificateConfig ¶
func ProvideCACertificateConfig(config ControlPlaneConfigModel) cert.CACertificateConfig
func ProvideClientCATLSCertificateConfig ¶
func ProvideClientCATLSCertificateConfig(config WorkerConfigModel) cert.WorkerNodeCACertificateConfig
func ProvideGRPCClientConfig ¶
func ProvideGRPCClientConfig(config WorkerConfigModel, clientCACertificate cert.WorkerNodeCACertificate, grpcResolver grpc.RAJDSGRPCResolver) grpc.ClientConfig
func ProvideHTTPServerConfig ¶
func ProvideHTTPServerConfig(config ControlPlaneConfigModel) http.ServerConfig
func ProvideMongoConfig ¶
func ProvideMongoConfig(config ControlPlaneConfigModel) mongo.Config
func ProvideTransportCertificateConfig ¶
func ProvideTransportCertificateConfig(config ControlPlaneConfigModel) cert.TransportCertificateConfig
func ProvideWorkerGRPCConfig ¶
func ProvideWorkerHTTPServerConfig ¶
func ProvideWorkerHTTPServerConfig(config WorkerConfigModel) httpServer.ServerConfig
func ProvideWorkerNodeReceiverConfig ¶
func ProvideWorkerNodeReceiverConfig(config WorkerConfigModel) grpc.WorkerNodeReceiverConfig
func ProvideWorkerNodeTransportCertificate ¶
func ProvideWorkerNodeTransportCertificate(config WorkerConfigModel) cert.WorkerNodeTransportCertificateConfig
Types ¶
type CommonConfigModel ¶
type CommonConfigModel struct {
DebugMode bool `envconfig:"DEBUG_MODE" default:"false"`
}
type Config ¶
type Config struct { CommonConfigModel ControlPlaneConfig ControlPlaneConfigModel `envconfig:"CONTROL_PLANE"` WorkerConfig WorkerConfigModel `envconfig:"WORKER_NODE"` }
func ProvideConfig ¶
type ControlPlaneConfigModel ¶
type ControlPlaneConfigModel struct { GRPCServerPort int `envconfig:"GRPC_SERVER_PORT" default:"31234"` HTTPServerPort int `envconfig:"HTTP_SERVER_PORT" default:"31313"` MongoConfig mongo.Config `envconfig:"MONGO"` CACertificatePath string `envconfig:"CA_CERTIFICATE_PATH"` CAPrivateKeyPath string `envconfig:"CA_PRIVATE_KEY_PATH"` CertificatePath string `envconfig:"CERTIFICATE_PATH"` CertificatePrivateKeyPath string `envconfig:"CERTIFICATE_PRIVATE_KEY_PATH"` ResourceAwareDistributorConfig ResourceAwareDistributorConfigModel `envconfig:"RESOURCE_AWARE_DISTRIBUTOR"` TaskWatcherConfig TaskWatcherConfigModel `envconfig:"TASK_WATCHER_CONFIG"` }
func ProvideControlPlaneConfigModel ¶
func ProvideControlPlaneConfigModel(config *Config) ControlPlaneConfigModel
type ResourceAwareDistributorConfigModel ¶ added in v0.0.8
type ResourceAwareDistributorConfigModel struct {
AvailableResourceClearanceThreshold float32 `envconfig:"AVAILABLE_RESOURCE_CLEARANCE_THRESHOLD" default:"80"`
}
func ProvideResourceAwareDistributorConfigMode ¶ added in v0.0.8
func ProvideResourceAwareDistributorConfigMode(config ControlPlaneConfigModel) ResourceAwareDistributorConfigModel
type TaskWatcherConfigModel ¶ added in v0.0.14
type TaskWatcherConfigModel struct { SleepTime time.Duration `envconfig:"SLEEP_TIME" default:"1s"` Timeout time.Duration `envconfig:"TIMEOUT" default:"30s"` }
func ProvideTaskWatcherConfigModel ¶ added in v0.0.14
func ProvideTaskWatcherConfigModel(config ControlPlaneConfigModel) TaskWatcherConfigModel
type WorkerConfigModel ¶
type WorkerConfigModel struct { GRPCServerPort int `envconfig:"GRPC_SERVER_PORT" default:"31236"` WorkerNodeReceiverGRPCServerListeningPort int `envconfig:"WORKER_NODE_RECEIVER_GRPC_SERVER_LISTENING_PORT" default:"31237"` ControlPlaneHost string `envconfig:"CONTROL_PLANE_HOST"` CACertificatePath string `envconfig:"CA_CERTIFICATE_PATH"` CertificatePath string `envconfig:"CERTIFICATE_PATH"` CertificatePrivateKeyPath string `envconfig:"CERTIFICATE_PRIVATE_KEY_PATH"` ContainerStartDelayTimeSeconds time.Duration `envconfig:"CONTAINER_START_DELAY_TIME_SECONDS" default:"10s"` HTTPServerPort int `envconfig:"HTTP_SERVER_PORT" default:"30001"` MaxMemoryUsage string `envconfig:"MAX_MEMORY_USAGE" default:"16GiB"` MemoryBufferSize string `envconfig:"MEMORY_BUFFER_SIZE" default:"1GiB"` MaxCpuUsagePercentage int `envconfig:"MAX_CPU_USAGE_PERCENTAGE" default:"100"` CpuBufferSize int `envconfig:"CPU_BUFFER_SIZE" default:"20"` DockerCoreLimit int `envconfig:"DOCKER_CORE_LIMIT" required:"true"` TotalContainerLimit int `envconfig:"TOTAL_CONTAINER_CONFIG" default:"1"` TaskBufferTimeout time.Duration `envconfig:"TASK_BUFFER_TIMEOUT" default:"30s"` ContainerBufferTimeout time.Duration `envconfig:"CONTAINER_BUFFER_TIMEOUT" default:"30s"` ContainerLogDir string `envconfig:"CONTAINER_LOG_DIR" default:"/tmp/rajds-log"` }
func ProvideWorkerConfigModel ¶
func ProvideWorkerConfigModel(config *Config) WorkerConfigModel
Source Files ¶
Click to show internal directories.
Click to hide internal directories.