Documentation
¶
Index ¶
- Constants
- func GlobalStreamListener(client *redis.Client, repo repository.Repository, ...)
- func InitGlobalStream(client *redis.Client) error
- func ResourceStream(client *redis.Client, streamName string, conn *websocket.Conn) error
- type Conf
- type InfraOption
- type ProvisionerOperation
- type ResourceCRUDHandler
Constants ¶
const GlobalStreamGroupName = "portersvr"
GlobalStreamGroupName is the name of the Redis consumer group that this server is a part of
const GlobalStreamName = "global"
GlobalStreamName is the name of the Redis stream for global operations
Variables ¶
This section is empty.
Functions ¶
func GlobalStreamListener ¶
func GlobalStreamListener( client *redis.Client, repo repository.Repository, analyticsClient analytics.AnalyticsSegmentClient, errorChan chan error, )
GlobalStreamListener performs an XREADGROUP operation on a given stream and updates models in the database as necessary
func InitGlobalStream ¶
InitGlobalStream initializes the global stream if it does not exist, and the global consumer group if it does not exist
Types ¶
type Conf ¶
type Conf struct {
Kind InfraOption
Name string
Namespace string
ID string
Redis *config.RedisConf
Postgres *config.DBConf
Operation ProvisionerOperation
ProvisionerImageTag string
ImagePullSecret string
LastApplied []byte
// AWS
AWS *aws.Conf
ECR *ecr.Conf
EKS *eks.Conf
// GKE
GCP *gcp.Conf
GKE *gke.Conf
// DO
DO *do.Conf
DOCR *docr.Conf
DOKS *doks.Conf
}
Conf is the config required to start a provisioner container
func (*Conf) GetProvisionerJobTemplate ¶
GetProvisionerJobTemplate returns the manifest that should be applied to create a provisioning job
func (*Conf) GetRedisStreamID ¶
GetRedisStreamID returns the stream id that should be used
func (*Conf) GetTFWorkspaceID ¶
GetTFWorkspaceID returns the workspace id that should be used
type InfraOption ¶
type InfraOption string
InfraOption is a type of infrastructure that can be provisioned
const ( Test InfraOption = "test" ECR InfraOption = "ecr" EKS InfraOption = "eks" GCR InfraOption = "gcr" GKE InfraOption = "gke" DOCR InfraOption = "docr" DOKS InfraOption = "doks" )
The list of infra options
type ProvisionerOperation ¶
type ProvisionerOperation string
const ( Apply ProvisionerOperation = "apply" Destroy ProvisionerOperation = "destroy" )
type ResourceCRUDHandler ¶
ResourceCRUDHandler is a handler for updates to an infra resource