network

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

  • Nuts registry
  • Copyright (C) 2020. Nuts community *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU General Public License for more details. *
  • You should have received a copy of the GNU General Public License
  • along with this program. If not, see <https://www.gnu.org/licenses/>. *

Package network is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ambassador

type Ambassador interface {
	RegisterEventHandlers(fn events.EventRegistrar, eventType []events.EventType)
	// Start instructs the ambassador to start receiving events from the network.
	Start()
}

Ambassador acts as integration point between the registry and network by sending registry events to the network and (later on) process notifications of new documents on the network that might be of interest to the registyr.

func NewAmbassador

func NewAmbassador(networkClient network.NetworkClient, cryptoClient crypto.Client, eventSystem events.EventSystem) Ambassador

NewAmbassador creates a new Ambassador. Don't forget to call RegisterEventHandlers afterwards.

type MockAmbassador

type MockAmbassador struct {
	// contains filtered or unexported fields
}

MockAmbassador is a mock of Ambassador interface

func NewMockAmbassador

func NewMockAmbassador(ctrl *gomock.Controller) *MockAmbassador

NewMockAmbassador creates a new mock instance

func (*MockAmbassador) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockAmbassador) RegisterEventHandlers

func (m *MockAmbassador) RegisterEventHandlers(fn events.EventRegistrar, eventType []events.EventType)

RegisterEventHandlers mocks base method

func (*MockAmbassador) Start

func (m *MockAmbassador) Start()

Start mocks base method

type MockAmbassadorMockRecorder

type MockAmbassadorMockRecorder struct {
	// contains filtered or unexported fields
}

MockAmbassadorMockRecorder is the mock recorder for MockAmbassador

func (*MockAmbassadorMockRecorder) RegisterEventHandlers

func (mr *MockAmbassadorMockRecorder) RegisterEventHandlers(fn, eventType interface{}) *gomock.Call

RegisterEventHandlers indicates an expected call of RegisterEventHandlers

func (*MockAmbassadorMockRecorder) Start

func (mr *MockAmbassadorMockRecorder) Start() *gomock.Call

Start indicates an expected call of Start

Jump to

Keyboard shortcuts

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