edge

package
v0.0.0-...-14b4a77 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package edge is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAuthorizationDenied = errors.New("authorization denied")
	ErrTlsHandshakeFailed  = errors.New("tls handshake failed")
	ErrNotConnected        = errors.New("not connected")
	ErrUnknown             = errors.New("unknown error")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	// Enrol sends the enrolment information.
	Enrol(ctx context.Context, deviceID string, info entity.EnrolementInfo) error

	// Register sends the registration info.
	// Registration info is actually a csr which will be signed by the operator and send back with the response.
	Register(ctx context.Context, deviceID string, registerInfo entity.RegistrationInfo) (entity.RegistrationResponse, error)

	// Heartbeat
	Heartbeat(ctx context.Context, deviceID string, heartbeat entity.Heartbeat) error

	// GetConfiguration get the configuration from flotta-operator
	GetConfiguration(ctx context.Context, deviceID string) (entity.DeviceConfigurationMessage, error)

	// Close connection if any.
	Close(ctx context.Context)
}

type Controller

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

func New

func New(client Client, confManager *configuration.Manager, certManager *certificate.Manager) *Controller

func (*Controller) Shutdown

func (c *Controller) Shutdown(ctx context.Context)

func (*Controller) Start

func (c *Controller) Start(ctx context.Context)

type MockClient

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

MockClient is a mock of Client interface.

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

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

func (*MockClient) Enrol

func (m *MockClient) Enrol(arg0 context.Context, arg1 string, arg2 entity.EnrolementInfo) error

Enrol mocks base method.

func (*MockClient) GetConfiguration

func (m *MockClient) GetConfiguration(arg0 context.Context, arg1 string) (entity.DeviceConfigurationMessage, error)

GetConfiguration mocks base method.

func (*MockClient) Heartbeat

func (m *MockClient) Heartbeat(arg0 context.Context, arg1 string, arg2 entity.Heartbeat) error

Heartbeat mocks base method.

func (*MockClient) Register

Register mocks base method.

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient.

func (*MockClientMockRecorder) Enrol

func (mr *MockClientMockRecorder) Enrol(arg0, arg1, arg2 interface{}) *gomock.Call

Enrol indicates an expected call of Enrol.

func (*MockClientMockRecorder) GetConfiguration

func (mr *MockClientMockRecorder) GetConfiguration(arg0, arg1 interface{}) *gomock.Call

GetConfiguration indicates an expected call of GetConfiguration.

func (*MockClientMockRecorder) Heartbeat

func (mr *MockClientMockRecorder) Heartbeat(arg0, arg1, arg2 interface{}) *gomock.Call

Heartbeat indicates an expected call of Heartbeat.

func (*MockClientMockRecorder) Register

func (mr *MockClientMockRecorder) Register(arg0, arg1, arg2 interface{}) *gomock.Call

Register indicates an expected call of Register.

Jump to

Keyboard shortcuts

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