MCPcopy Create free account
hub / github.com/cloudbase/garm / sendNotify

Method sendNotify

database/sql/util.go:781–795  ·  view source on GitHub ↗
(entityType dbCommon.DatabaseEntityType, op dbCommon.OperationType, payload interface{})

Source from the content-addressed store, hash-verified

779}
780
781func (s *sqlDatabase) sendNotify(entityType dbCommon.DatabaseEntityType, op dbCommon.OperationType, payload interface{}) error {
782 if s.producer == nil {
783 // no producer was registered. Not sending notifications.
784 return nil
785 }
786 if payload == nil {
787 return errors.New("missing payload")
788 }
789 message := dbCommon.ChangePayload{
790 Operation: op,
791 Payload: payload,
792 EntityType: entityType,
793 }
794 return s.producer.Notify(message)
795}
796
797func (s *sqlDatabase) GetForgeEntity(_ context.Context, entityType params.ForgeEntityType, entityID string) (params.ForgeEntity, error) {
798 var ghEntity params.EntityGetter

Callers 15

CreateRepositoryMethod · 0.95
DeleteRepositoryMethod · 0.95
UpdateRepositoryMethod · 0.95
CreateFileObjectMethod · 0.95
UpdateFileObjectMethod · 0.95
DeleteFileObjectMethod · 0.95
DeleteJobMethod · 0.95
LockJobMethod · 0.95
BreakLockJobIsQueuedMethod · 0.95
UnlockJobMethod · 0.95

Calls 1

NotifyMethod · 0.65

Tested by

no test coverage detected