kubo/core/coreiface/routing.go
2023-11-29 12:29:59 +01:00

17 lines
401 B
Go

package iface
import (
"context"
"github.com/ipfs/kubo/core/coreiface/options"
)
// RoutingAPI specifies the interface to the routing layer.
type RoutingAPI interface {
// Get retrieves the best value for a given key
Get(context.Context, string) ([]byte, error)
// Put sets a value for a given key
Put(ctx context.Context, key string, value []byte, opts ...options.RoutingPutOption) error
}