Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused code #2941

Merged
merged 1 commit into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion go/lib/pktcls/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "go_default_library",
srcs = [
"action.go",
"class.go",
"cond.go",
"doc.go",
Expand Down
71 changes: 0 additions & 71 deletions go/lib/pktcls/action.go

This file was deleted.

19 changes: 6 additions & 13 deletions go/lib/pktcls/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2017 ETH Zurich
// Copyright 2019 ETH Zurich, Anapaya Systems
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -12,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package class implements tools for classifying and acting on network
// Package pktcls implements tools for classifying and acting on network
// packets.
//
// A class is a named condition that exposes an Eval method; when Eval yields
Expand All @@ -28,16 +29,8 @@
// and ToS/DSCP fields match. Multiple predicates can be checked by enumerating
// them under AllOf or AnyOf.
//
// Actions are marshalable objects that describe a process. Currently, the only
// supported actions are Path Filters (ActionFilterPaths), which are containers
// for a spathmeta.PathPredicate object.
//
// Marshalable policies can be implemented by external code by mapping Cond
// items to Action items.
//
// Package class supports JSON marshaling and unmarshaling of classes and
// actions. Due to the custom formatting of the JSON output, marshaling must
// be done by first adding the classes and actions to a ClassMap or ActionMap,
// respectively. Unmarshaling back to the Map is guaranteed to yield an object
// that is identical to the initial one.
// The package contains support for JSON marshaling and unmarshaling of
// classes. Due to the custom formatting of the JSON output, marshaling must be
// done by first adding the classes to a ClassMap. Unmarshaling back to the Map
// is guaranteed to yield an object that is identical to the initial one.
package pktcls
13 changes: 0 additions & 13 deletions go/lib/pktcls/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,6 @@ func unmarshalCond(b []byte) (Cond, error) {
return c, nil
}

// unmarshalAction extracts an Action from a JSON encoding
func unmarshalAction(b []byte) (Action, error) {
t, err := unmarshalInterface(b)
if err != nil {
return nil, err
}
a, ok := t.(Action)
if !ok {
return nil, common.NewBasicError("Unable to extract Cond from interface", nil)
}
return a, nil
}

// unmarshal extracts an IPv4Predicate from a JSON encoding
func unmarshalPredicate(b []byte) (IPv4Predicate, error) {
t, err := unmarshalInterface(b)
Expand Down
20 changes: 2 additions & 18 deletions go/lib/spath/spathmeta/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,28 +1,12 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
load("@io_bazel_rules_go//go:def.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = [
"apppath.go",
"pred.go",
],
srcs = ["apppath.go"],
importpath = "github.com/scionproto/scion/go/lib/spath/spathmeta",
visibility = ["//visibility:public"],
deps = [
"//go/lib/common:go_default_library",
"//go/lib/sciond:go_default_library",
],
)

go_test(
name = "go_default_test",
srcs = ["pred_test.go"],
embed = [":go_default_library"],
deps = [
"//go/lib/addr:go_default_library",
"//go/lib/sciond:go_default_library",
"//go/lib/xtest/graph:go_default_library",
"@com_github_golang_mock//gomock:go_default_library",
"@com_github_smartystreets_goconvey//convey:go_default_library",
],
)
106 changes: 0 additions & 106 deletions go/lib/spath/spathmeta/pred.go

This file was deleted.

Loading