sentinel

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package sentinel defines type interfaces and other code used by sentinel.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commiter

type Commiter interface {
	Add(ctx context.Context, cid cid.Cid) error
}

Commiter is responsible for adding commits at the head of the topic it serves.

type ErrorValidation

type ErrorValidation struct {
	Kind ErrorValidationKind
	Err  error
}

func (ErrorValidation) Error

func (e ErrorValidation) Error() string

func (ErrorValidation) Unwrap

func (e ErrorValidation) Unwrap() error

type ErrorValidationKind

type ErrorValidationKind uint
const (
	ErrorValidationKindUnknown ErrorValidationKind = iota
	ErrorValidationKindNotFound
	ErrorValidationKindInternal
	ErrorValidationKindIncorrectContent
)

type Pinner

type Pinner interface {
	Pin(ctx context.Context, cid cid.Cid) error
}

Pinner is responsible for pinning message - thus replicating it and making accessible to external consumers

type Validator

type Validator interface {
	Validate(ctx context.Context, cid cid.Cid) error
}

Validator validates message contents in sentinel. It should be implemented by topic owner.

Directories

Path Synopsis
Package commiter contains implementations of committers.
Package commiter contains implementations of committers.
Package pinner implements an in-memory IPFS pinner.
Package pinner implements an in-memory IPFS pinner.
Package sentinelpb contains proto definitions of sentinel services.
Package sentinelpb contains proto definitions of sentinel services.
Package service implements sentinel endpoints.
Package service implements sentinel endpoints.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL