From aba609dc5fed23dc44d4d57e51c8f872e4aac076 Mon Sep 17 00:00:00 2001 From: Mark Rushakoff Date: Thu, 31 Oct 2024 14:01:49 -0400 Subject: [PATCH] chore: add doc.go to several packages This helps with navigating pkg.go.dev for Gordian. --- gcrypto/doc.go | 2 ++ tm/tmcodec/doc.go | 3 +++ tm/tmcodec/tmjson/doc.go | 6 ++++++ tm/tmengine/doc.go | 3 +++ tm/tmp2p/doc.go | 2 ++ tm/tmp2p/tmlibp2p/doc.go | 6 ++++++ tm/tmp2p/tmlibp2p/tmlibp2ptest/doc.go | 4 ++++ tm/tmp2p/tmp2ptest/doc.go | 3 +++ tm/tmstore/tmstoretest/doc.go | 4 ++++ 9 files changed, 33 insertions(+) create mode 100644 gcrypto/doc.go create mode 100644 tm/tmcodec/doc.go create mode 100644 tm/tmcodec/tmjson/doc.go create mode 100644 tm/tmengine/doc.go create mode 100644 tm/tmp2p/doc.go create mode 100644 tm/tmp2p/tmlibp2p/doc.go create mode 100644 tm/tmp2p/tmlibp2p/tmlibp2ptest/doc.go create mode 100644 tm/tmp2p/tmp2ptest/doc.go create mode 100644 tm/tmstore/tmstoretest/doc.go diff --git a/gcrypto/doc.go b/gcrypto/doc.go new file mode 100644 index 0000000..fe0f7af --- /dev/null +++ b/gcrypto/doc.go @@ -0,0 +1,2 @@ +// Package gcrypto contains cryptographic primitives for the Gordian engine. +package gcrypto diff --git a/tm/tmcodec/doc.go b/tm/tmcodec/doc.go new file mode 100644 index 0000000..7c53520 --- /dev/null +++ b/tm/tmcodec/doc.go @@ -0,0 +1,3 @@ +// Package tmcodec contains types for marshalling and unmarshalling consensus messages, +// without being coupled to any particular serialization scheme. +package tmcodec diff --git a/tm/tmcodec/tmjson/doc.go b/tm/tmcodec/tmjson/doc.go new file mode 100644 index 0000000..fc4193e --- /dev/null +++ b/tm/tmcodec/tmjson/doc.go @@ -0,0 +1,6 @@ +// Package tmjson contains types satisfying the [tmcodec] interfaces +// that serializing to and deserialize from JSON. +// +// These types are simple to work with, simple to maintain, and easy to read. +// You can certainly get better performance with other serialization methods. +package tmjson diff --git a/tm/tmengine/doc.go b/tm/tmengine/doc.go new file mode 100644 index 0000000..cef6db8 --- /dev/null +++ b/tm/tmengine/doc.go @@ -0,0 +1,3 @@ +// Package tmengine contains the [Engine] and its supporting types +// which are used to actually create a consensus engine. +package tmengine diff --git a/tm/tmp2p/doc.go b/tm/tmp2p/doc.go new file mode 100644 index 0000000..6cf9545 --- /dev/null +++ b/tm/tmp2p/doc.go @@ -0,0 +1,2 @@ +// Package tmp2p contains high-level interfaces for the peer-to-peer layer for [tmengine]. +package tmp2p diff --git a/tm/tmp2p/tmlibp2p/doc.go b/tm/tmp2p/tmlibp2p/doc.go new file mode 100644 index 0000000..b76ebb9 --- /dev/null +++ b/tm/tmp2p/tmlibp2p/doc.go @@ -0,0 +1,6 @@ +// Package tmlibp2p contains implementations of the [tmp2p] interfaces +// using [github.com/libp2p/go-libp2p]. +// +// Note that this package will likely be moved to its own module +// in a separate git repository, in the future. +package tmlibp2p diff --git a/tm/tmp2p/tmlibp2p/tmlibp2ptest/doc.go b/tm/tmp2p/tmlibp2p/tmlibp2ptest/doc.go new file mode 100644 index 0000000..fe2afce --- /dev/null +++ b/tm/tmp2p/tmlibp2p/tmlibp2ptest/doc.go @@ -0,0 +1,4 @@ +// Package tmlibp2ptest provides the [Network] type +// that is useful for tests that need to instantiate +// a Gordian peer-to-peer network backed by [tmlibp2p]. +package tmlibp2ptest diff --git a/tm/tmp2p/tmp2ptest/doc.go b/tm/tmp2p/tmp2ptest/doc.go new file mode 100644 index 0000000..7035ba0 --- /dev/null +++ b/tm/tmp2p/tmp2ptest/doc.go @@ -0,0 +1,3 @@ +// Package tmp2ptest contains compliance tests for tmp2p implementations, +// and it also provides some other types that are useful in tests. +package tmp2ptest diff --git a/tm/tmstore/tmstoretest/doc.go b/tm/tmstore/tmstoretest/doc.go new file mode 100644 index 0000000..1c851fd --- /dev/null +++ b/tm/tmstore/tmstoretest/doc.go @@ -0,0 +1,4 @@ +// Package tmstoretest contains the compliance tests for implementations of the [tmstore] interfaces. +// +// Refer to [github.com/gordian-engine/gordian/tm/tmmemstore] for examples of calling the compliance tests. +package tmstoretest