Documentation
¶
Overview ¶
Package service implements sentinel endpoints.
Index ¶
- type Service
- func (s *Service) GetHeadCID(ctx context.Context, req *sentinelpb.GetHeadCIDRequest) (*sentinelpb.GetHeadCIDResponse, error)
- func (s *Service) GetHeadIPNS(ctx context.Context, req *sentinelpb.GetHeadIPNSRequest) (*sentinelpb.GetHeadIPNSResponse, error)
- func (s *Service) Publish(ctx context.Context, req *sentinelpb.PublishRequest) (*sentinelpb.PublishResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { sentinelpb.UnimplementedSentinelServer // contains filtered or unexported fields }
Service implements sentinel GRPC server
func New ¶
func New(validator sentinel.Validator, pinner sentinel.Pinner, commiter sentinel.Commiter, headReader thead.Reader, ipnsManager ipns.Manager) *Service
New initializes sentinel service
func (*Service) GetHeadCID ¶
func (s *Service) GetHeadCID(ctx context.Context, req *sentinelpb.GetHeadCIDRequest) (*sentinelpb.GetHeadCIDResponse, error)
GetHeadCID can be used by consumers to fetch head from sentinel
func (*Service) GetHeadIPNS ¶ added in v1.1.1
func (s *Service) GetHeadIPNS(ctx context.Context, req *sentinelpb.GetHeadIPNSRequest) (*sentinelpb.GetHeadIPNSResponse, error)
GetHeadCID can be used by consumers to fetch head from sentinel
func (*Service) Publish ¶
func (s *Service) Publish(ctx context.Context, req *sentinelpb.PublishRequest) (*sentinelpb.PublishResponse, error)
Publish is GRPC method that producers can use to add message to topic
Click to show internal directories.
Click to hide internal directories.