Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
introspection: rename package, rm ListenAddr() from interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
raulk committed Feb 7, 2020
1 parent fbc69c1 commit ee8012e
Show file tree
Hide file tree
Showing 6 changed files with 156 additions and 156 deletions.
4 changes: 2 additions & 2 deletions introspect/doc.go → introspection/doc.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Package introspect is EXPERIMENTAL. It is subject to heavy change, and it
// Package introspection 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
package introspection
15 changes: 7 additions & 8 deletions introspect/introspect.go → introspection/introspect.go
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
package introspect
package introspection

import introspect_pb "github.com/libp2p/go-libp2p-core/introspect/pb"
import introspection_pb "github.com/libp2p/go-libp2p-core/introspection/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.
//
// Introspector implementations are usually injected in introspection endpoints
// (e.g. the default WebSocket endpoint) to serve the data to clients, but they
// can also be used separately for embedding or testing.
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
FetchFullState() (*introspection_pb.State, error)
}
File renamed without changes.
Loading

0 comments on commit ee8012e

Please sign in to comment.