Skip to content

Commit

Permalink
refactor: consumer
Browse files Browse the repository at this point in the history
  • Loading branch information
TYuan0816 committed May 10, 2024
1 parent 35175b3 commit 5920ef6
Show file tree
Hide file tree
Showing 4 changed files with 249 additions and 165 deletions.
31 changes: 31 additions & 0 deletions internal/sbi/consumer/consumer.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package consumer

import (
"github.com/free5gc/ausf/pkg/app"

"github.com/free5gc/openapi/Nnrf_NFDiscovery"
"github.com/free5gc/openapi/Nnrf_NFManagement"
)

type ConsumerAusf interface {
app.App
}

type Consumer struct {
ConsumerAusf

*nnrfService
}

func NewConsumer(ausf ConsumerAusf) (*Consumer, error) {
c := &Consumer{
ConsumerAusf: ausf,
}

c.nnrfService = &nnrfService{
consumer: c,
nfMngmntClients: make(map[string]*Nnrf_NFManagement.APIClient),
nfDiscClients: make(map[string]*Nnrf_NFDiscovery.APIClient),
}
return c, nil
}
40 changes: 0 additions & 40 deletions internal/sbi/consumer/nf_discovery.go

This file was deleted.

125 changes: 0 additions & 125 deletions internal/sbi/consumer/nf_management.go

This file was deleted.

Loading

0 comments on commit 5920ef6

Please sign in to comment.