github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/pkg/storage/application_service_noop.go (about) 1 package storage 2 3 import ( 4 "context" 5 6 "github.com/pyroscope-io/pyroscope/pkg/model/appmetadata" 7 ) 8 9 // NoopApplicationMetadataService implements same methods as ApplicationMetadataService 10 // But it doesn't do anything when called 11 type NoopApplicationMetadataService struct{} 12 13 func (NoopApplicationMetadataService) CreateOrUpdate(context.Context, appmetadata.ApplicationMetadata) error { 14 return nil 15 } 16 17 func (NoopApplicationMetadataService) List(context.Context, appmetadata.ApplicationMetadata) (apps []appmetadata.ApplicationMetadata, err error) { 18 return apps, err 19 } 20 21 func (NoopApplicationMetadataService) Get(context.Context, string) (app appmetadata.ApplicationMetadata, err error) { 22 return app, err 23 } 24 25 func (NoopApplicationMetadataService) Delete(context.Context, string) error { 26 return nil 27 }