Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LimesAPI ¶
type LimesAPI interface {
// Init the limes API.
Init(ctx context.Context)
// Fetch all commitments for the given projects.
GetAllCommitments(ctx context.Context, projects []identity.Project) ([]limes.Commitment, error)
}
func NewLimesAPI ¶
func NewLimesAPI(mon sync.Monitor, k keystone.KeystoneAPI, conf conf.SyncOpenStackLimesConfig) LimesAPI
Create a new OpenStack limes api.
type LimesSyncer ¶
type LimesSyncer struct {
// Database to store the limes objects in.
DB db.DB
// Monitor to track the syncer.
Mon sync.Monitor
// Configuration for the limes syncer.
Conf conf.SyncOpenStackLimesConfig
// Limes API client to fetch the data.
API LimesAPI
// MQTT client to publish mqtt data.
MqttClient mqtt.Client
}
Syncer for limes.
func (*LimesSyncer) Init ¶
func (s *LimesSyncer) Init(ctx context.Context)
func (*LimesSyncer) Sync ¶
func (s *LimesSyncer) Sync(ctx context.Context) error
Sync the limes objects.
func (*LimesSyncer) SyncCommitments ¶
func (s *LimesSyncer) SyncCommitments(ctx context.Context) ([]limes.Commitment, error)
Sync commitments from the limes API and store them in the database.
Click to show internal directories.
Click to hide internal directories.