Skip to content

Commit

Permalink
fix(stateful/azure): resolve file hierarchy issues (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
TamirYaariSpot authored Apr 18, 2022
1 parent 4328885 commit cca1ca2
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions service/stateful/stateful.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package stateful

import (
"github.com/spotinst/spotinst-sdk-go/service/stateful/providers/azure"
"github.com/spotinst/spotinst-sdk-go/spotinst"
"github.com/spotinst/spotinst-sdk-go/spotinst/client"
"github.com/spotinst/spotinst-sdk-go/spotinst/session"
)

// Service provides the API operation methods for making requests to endpoints
// of the Spotinst API. See this package's package overview docs for details on
// the service.
type Service interface {
CloudProviderAzure() azure.Service
}

type ServiceOp struct {
Client *client.Client
}

var _ Service = &ServiceOp{}

func New(sess *session.Session, cfgs ...*spotinst.Config) *ServiceOp {
cfg := &spotinst.Config{}
cfg.Merge(sess.Config)
cfg.Merge(cfgs...)

return &ServiceOp{
Client: client.New(cfg),
}
}

func (s *ServiceOp) CloudProviderAzure() azure.Service {
return &azure.ServiceOp{
Client: s.Client,
}
}

0 comments on commit cca1ca2

Please sign in to comment.