Documentation ¶
Index ¶
- func Replay(events []ddd.Event) ddd.Aggregate
- type Cluster
- func (c *Cluster) Destroy(timestamp int64) error
- func (c *Cluster) Destroyed() bool
- func (c *Cluster) Events() []ddd.Event
- func (c *Cluster) Name() string
- func (c *Cluster) Token() string
- func (c *Cluster) UUID() string
- func (c *Cluster) Update(name string, timestamp int64) error
- func (c *Cluster) Version() int
- type Created
- type Destroyed
- type ReadRepository
- type Service
- func (s Service) All(ctx context.Context, req *pb.ReadClusters) (*pb.ClustersRead, error)
- func (s Service) Create(ctx context.Context, cmd *pb.CreateCluster) (*pb.ClusterCreated, error)
- func (s Service) Destroy(ctx context.Context, cmd *pb.DestroyCluster) (*pb.ClusterDestroyed, error)
- func (s Service) Read(ctx context.Context, req *pb.ReadCluster) (*pb.ClusterRead, error)
- func (s Service) Ready() error
- func (s Service) Token(ctx context.Context, cmd *pb.ReadClusterToken) (*pb.ClusterTokenRead, error)
- func (s Service) Update(ctx context.Context, cmd *pb.UpdateCluster) (*pb.ClusterUpdated, error)
- type Updated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster represents a kubernetes cluster we are monitoring/deploying to
func (*Cluster) Destroyed ¶ added in v0.4.0
Destroyed determines if this deployment has been destroyed
type Destroyed ¶
type Destroyed struct {
Timestamp int64
}
Destroyed is the event for when a cluster is destroyed
type ReadRepository ¶ added in v0.4.0
type ReadRepository struct {
// contains filtered or unexported fields
}
ReadRepository is the repository for dealing with cluster reads
func NewReadRepository ¶ added in v0.4.0
func NewReadRepository(s storage.Storage) *ReadRepository
NewReadRepository creates a repository with the given storage
func (*ReadRepository) All ¶ added in v0.4.0
func (rr *ReadRepository) All() ([]*Cluster, error)
All gets all clusters
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the implementation for twirp to use
func NewService ¶
NewService creates the service
func (Service) All ¶
func (s Service) All(ctx context.Context, req *pb.ReadClusters) (*pb.ClustersRead, error)
All gets all clusters currently configured and their status
func (Service) Create ¶
func (s Service) Create(ctx context.Context, cmd *pb.CreateCluster) (*pb.ClusterCreated, error)
Create adds a cluster to the list of configurations
func (Service) Destroy ¶
func (s Service) Destroy(ctx context.Context, cmd *pb.DestroyCluster) (*pb.ClusterDestroyed, error)
Destroy removes a cluster from the list of configurations
func (Service) Read ¶
func (s Service) Read(ctx context.Context, req *pb.ReadCluster) (*pb.ClusterRead, error)
Read reads out a cluster
func (Service) Ready ¶ added in v0.3.2
Ready implements the ReadyService method so this service can be part of a health check routine
func (Service) Token ¶ added in v0.7.0
func (s Service) Token(ctx context.Context, cmd *pb.ReadClusterToken) (*pb.ClusterTokenRead, error)
Token gets the cluster's access token
func (Service) Update ¶
func (s Service) Update(ctx context.Context, cmd *pb.UpdateCluster) (*pb.ClusterUpdated, error)
Update edits an already existing cluster