This repository has been archived by the owner on Sep 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e075dc9
commit c72a961
Showing
9 changed files
with
7,470 additions
and
0 deletions.
There are no files selected for viewing
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
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
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
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,9 @@ | ||
// Package introspect is EXPERIMENTAL. It is subject to heavy change, and it | ||
// WILL change. For now, it is the simplest implementation to power the | ||
// proof-of-concept of the libp2p introspection framework. | ||
// | ||
// Package introspect contains the abstract skeleton of the introspection system | ||
// of go-libp2p. It holds the introspection data schema, and the primitives that | ||
// allow subsystems to register data providers, and clients to fetch the current | ||
// state of the system. | ||
package introspect |
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,25 @@ | ||
package introspect | ||
|
||
import introspect_pb "github.com/libp2p/go-libp2p-core/introspect/pb" | ||
|
||
// ProtoVersion is the current version of the introspection protocol. | ||
const ProtoVersion uint32 = 1 | ||
|
||
// EXPERIMENTAL. Introspector allows other sub-systems/modules to register | ||
// metrics/data providers AND also enables clients to fetch the current state of | ||
// the system. | ||
type Introspector interface { | ||
|
||
// EXPERIMENTAL. RegisterDataProviders allows sub-systems/modules to | ||
// register callbacks that supply introspection data. | ||
RegisterDataProviders(p *DataProviders) error | ||
|
||
// EXPERIMENTAL. FetchFullState returns the full state of the system, by | ||
// calling all known data providers and returning a merged cross-cut of the | ||
// running system. | ||
FetchFullState() (*introspect_pb.State, error) | ||
|
||
// EXPERIMENTAL. ListenAddrs returns the addresses on which the | ||
// introspection server endpoint is listening for clients. | ||
ListenAddrs() []string | ||
} |
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,11 @@ | ||
PB = $(wildcard *.proto) | ||
GO = $(PB:.proto=.pb.go) | ||
|
||
all: $(GO) | ||
|
||
%.pb.go: %.proto | ||
protoc --proto_path=$(PWD):$(PWD)/../..:$(GOPATH)/src --gogofaster_out=Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types:. $< | ||
|
||
clean: | ||
rm -f *.pb.go | ||
rm -f *.go |
Oops, something went wrong.