Skip to content

Commit

Permalink
colibri: advance request handling (#3859)
Browse files Browse the repository at this point in the history
- Segment request operations are complete
- E2E request operations with the exception of the admission one are complete
  • Loading branch information
juagargi authored Sep 4, 2020
1 parent ffea3ce commit b823a59
Show file tree
Hide file tree
Showing 4 changed files with 261 additions and 49 deletions.
2 changes: 2 additions & 0 deletions go/cs/reservation/segment/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ type Response struct {
FailedHop uint8 // if accepted is false, the AS that failed it
}

var _ base.MessageWithPath = (*Response)(nil)

// NewResponse contructs the segment Response type.
func NewResponse(ts time.Time, id *reservation.SegmentID, idx reservation.IndexNumber,
path *spath.Path, accepted bool, failedHop uint8) (*Response, error) {
Expand Down
1 change: 0 additions & 1 deletion go/cs/reservationstorage/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ go_library(
"//go/cs/reservation:go_default_library",
"//go/cs/reservation/e2e:go_default_library",
"//go/cs/reservation/segment:go_default_library",
"//go/lib/colibri/reservation:go_default_library",
"//go/lib/infra/modules/cleaner:go_default_library",
],
)
19 changes: 12 additions & 7 deletions go/cs/reservationstorage/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,23 @@ import (
base "github.com/scionproto/scion/go/cs/reservation"
"github.com/scionproto/scion/go/cs/reservation/e2e"
sgt "github.com/scionproto/scion/go/cs/reservation/segment"
rsv "github.com/scionproto/scion/go/lib/colibri/reservation"
"github.com/scionproto/scion/go/lib/infra/modules/cleaner"
)

// Store is the interface to interact with the reservation store.
type Store interface {
AdmitSegmentReservation(ctx context.Context, req *sgt.SetupReq) (base.MessageWithPath, error)
ConfirmSegmentReservation(ctx context.Context, id rsv.SegmentID, idx rsv.IndexNumber) error
CleanupSegmentReservation(ctx context.Context, id rsv.SegmentID, idx rsv.IndexNumber) error
TearDownSegmentReservation(ctx context.Context, id rsv.SegmentID, idx rsv.IndexNumber) error
AdmitE2EReservation(ctx context.Context, req e2e.SetupReq) error
CleanupE2EReservation(ctx context.Context, id rsv.E2EID, idx rsv.IndexNumber) error
AdmitSegmentReservation(ctx context.Context, req *sgt.SetupReq) (
base.MessageWithPath, error)
ConfirmSegmentReservation(ctx context.Context, req *sgt.IndexConfirmationReq) (
base.MessageWithPath, error)
CleanupSegmentReservation(ctx context.Context, req *sgt.CleanupReq) (
base.MessageWithPath, error)
TearDownSegmentReservation(ctx context.Context, req *sgt.TeardownReq) (
base.MessageWithPath, error)
AdmitE2EReservation(ctx context.Context, req *e2e.SetupReq) (
base.MessageWithPath, error)
CleanupE2EReservation(ctx context.Context, req *e2e.CleanupReq) (
base.MessageWithPath, error)

DeleteExpiredIndices(ctx context.Context) (int, error)
}
Expand Down
Loading

0 comments on commit b823a59

Please sign in to comment.