mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-05 08:18:03 +08:00
17 lines
401 B
Go
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
|
|
}
|