-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: Iff1666721e931963b7cf18fd403b5b76bad8837e
- Loading branch information
Showing
132 changed files
with
569 additions
and
1,904 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"log" | ||
|
||
"cuelang.org/go/cue" | ||
"cuelang.org/go/cue/ast" | ||
"cuelang.org/go/cue/cuecontext" | ||
"cuelang.org/go/cue/load" | ||
) | ||
|
||
var skeletonOptions = []cue.Option{ | ||
cue.Attributes(true), | ||
cue.Concrete(false), | ||
cue.Definitions(false), | ||
cue.DisallowCycles(true), | ||
cue.Docs(true), | ||
cue.Hidden(true), | ||
cue.Optional(true), | ||
} | ||
|
||
func main() { | ||
ctx := cuecontext.New() | ||
bis := load.Instances([]string{}, &load.Config{Dir: "../.."}) | ||
for _, bi := range bis { | ||
if bi.Err != nil { | ||
log.Fatal("Error during loading", "entrypoints", "error", bi.Err) | ||
} | ||
orgCue := ctx.BuildInstance(bi) | ||
orgNode := orgCue.Syntax(skeletonOptions...) | ||
beforeNode := func(v ast.Node) bool { | ||
return true | ||
} | ||
|
||
debugNode := func(v ast.Node) { | ||
for _, comment := range ast.Comments(v) { | ||
for _, lines := range comment.List { | ||
fmt.Println("debugging ast", "comment", lines.Text, "name", ast.Name(v)) | ||
} | ||
} | ||
} | ||
|
||
ast.Walk(orgNode, beforeNode, debugNode) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# risinfo | ||
|
||
risinfo serves a prefix -> origin mapping derived from routeviews.org RIB dumps as a ClickHouse dictionary. | ||
This data is much more recent than Maxmind ASN data. | ||
|
||
It's quite expensive to fetch and process a full internet routing table (~60s). In the future, we may introduce a layer of server-side caching with prebuilt lookup tables available for download. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.