Skip to content

Commit

Permalink
update handlers o support version
Browse files Browse the repository at this point in the history
Signed-off-by: MUzairS15 <[email protected]>
  • Loading branch information
MUzairS15 committed Aug 15, 2023
1 parent 052d146 commit c70df71
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 6 additions & 6 deletions adapter/meshmodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"time"

backoff "github.com/cenkalti/backoff/v4"
"github.com/layer5io/meshkit/models/meshmodel"
"github.com/layer5io/meshkit/models/meshmodel/core/types"
"github.com/layer5io/meshkit/models/meshmodel/core/v1alpha1"
"github.com/layer5io/meshkit/models/meshmodel/registry"
)

// MeshModelRegistrantDefinitionPath - Structure for configuring registrant paths
Expand Down Expand Up @@ -50,15 +50,15 @@ func NewMeshModelRegistrant(paths []MeshModelRegistrantDefinitionPath, HTTPRegis
// Register function is a blocking function
func (or *MeshModelRegistrant) Register(ctxID string) error {
for _, dpath := range or.Paths {
var mrd meshmodel.MeshModelRegistrantData
var mrd registry.MeshModelRegistrantData
definition, err := os.Open(dpath.EntityDefintionPath)
if err != nil {
return ErrOpenOAMDefintionFile(err)
}
mrd.Host = meshmodel.Host{
Hostname: dpath.Host,
Port: dpath.Port,
ContextID: ctxID,
mrd.Host = registry.Host{
Hostname: dpath.Host,
Port: dpath.Port,
Metadata: ctxID,
}
mrd.EntityType = dpath.Type
switch dpath.Type {
Expand Down
5 changes: 5 additions & 0 deletions adapter/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ var (

type Version string

func (v Version) String() string {
return string(v)
}

type Template string

type Service string
Expand Down Expand Up @@ -68,6 +72,7 @@ type OperationRequest struct {
IsDeleteOperation bool // If true, the operation specified by OperationName is reverted, i.e. all resources created are deleted.
OperationID string // ID of the operation, if any. This identifies a specific operation invocation.
K8sConfigs []string
Version string // Service mesh version to be installed, defaults to latest version.
}

type OAMRequest struct {
Expand Down

0 comments on commit c70df71

Please sign in to comment.