Skip to content

Commit 1cc647b

Browse files
Refactor admin server storage api
- remove close from the api Signed-off-by: Mohamed Abokammer <mahmednabil109@gmail.com>
1 parent fe65fea commit 1cc647b

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

cmds/admin_server/storage/mongo/mongo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type MongoStorage struct {
2727
collection *mongo.Collection
2828
}
2929

30-
func NewMongoStorage(ctx xcontext.Context, uri string) (storage.Storage, error) {
30+
func NewMongoStorage(ctx xcontext.Context, uri string) (*MongoStorage, error) {
3131
client, err := mongo.NewClient(options.Client().ApplyURI(uri))
3232
if err != nil {
3333
return nil, err

cmds/admin_server/storage/storage.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ var (
2121
type Storage interface {
2222
StoreLogs(ctx xcontext.Context, logs []Log) error
2323
GetLogs(ctx xcontext.Context, query Query) (*Result, error)
24-
25-
Close(ctx xcontext.Context) error
2624
}
2725

2826
// Log defines the basic log info pushed by the server

0 commit comments

Comments
 (0)