mock

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoveryMock

type DiscoveryMock struct {
	mock.Mock
}

DiscoveryMock struct for disco mock

func (*DiscoveryMock) AutoSync

func (m *DiscoveryMock) AutoSync()

AutoSync auto sync

func (*DiscoveryMock) Close

func (m *DiscoveryMock) Close() error

Close mock

func (*DiscoveryMock) FindMicroServiceInstances

func (m *DiscoveryMock) FindMicroServiceInstances(consumerID, appID, microServiceName, version, env string) ([]*registry.MicroServiceInstance, error)

FindMicroServiceInstances find micro-service instances

func (*DiscoveryMock) GetAllApplications

func (m *DiscoveryMock) GetAllApplications() ([]string, error)

GetAllApplications get all applications

func (*DiscoveryMock) GetAllMicroServices

func (m *DiscoveryMock) GetAllMicroServices() ([]*registry.MicroService, error)

GetAllMicroServices get all microservices

func (*DiscoveryMock) GetMicroService

func (m *DiscoveryMock) GetMicroService(microServiceID string) (*registry.MicroService, error)

GetMicroService get micro service

func (*DiscoveryMock) GetMicroServiceID

func (m *DiscoveryMock) GetMicroServiceID(appID, microServiceName, version, env string) (string, error)

GetMicroServiceID get micro-service id

func (*DiscoveryMock) GetMicroServiceInstances

func (m *DiscoveryMock) GetMicroServiceInstances(consumerID, providerID string) ([]*registry.MicroServiceInstance, error)

GetMicroServiceInstances get micro-service instances

func (*DiscoveryMock) WatchMicroService

func (m *DiscoveryMock) WatchMicroService(selfMicroServiceID string, callback func(*model.MicroServiceInstanceChangedEvent))

WatchMicroService watch micro-service

type RegistratorMock

type RegistratorMock struct {
	mock.Mock
}

RegistratorMock struct for register mock

func (*RegistratorMock) AddDependencies

func (m *RegistratorMock) AddDependencies(request *registry.MicroServiceDependency) error

AddDependencies add dependencies

func (*RegistratorMock) AddSchemas

func (m *RegistratorMock) AddSchemas(microServiceID, schemaName, schemaInfo string) error

AddSchemas add schemas

func (*RegistratorMock) Close

func (m *RegistratorMock) Close() error

Close to close the registry mock

func (*RegistratorMock) Heartbeat

func (m *RegistratorMock) Heartbeat(microServiceID, microServiceInstanceID string) (bool, error)

Heartbeat heart beat

func (*RegistratorMock) RegisterService

func (m *RegistratorMock) RegisterService(microservice *registry.MicroService) (string, error)

RegisterService register service

func (*RegistratorMock) RegisterServiceAndInstance

func (m *RegistratorMock) RegisterServiceAndInstance(microService *registry.MicroService, instance *registry.MicroServiceInstance) (string, string, error)

RegisterServiceAndInstance register service and instance

func (*RegistratorMock) RegisterServiceInstance

func (m *RegistratorMock) RegisterServiceInstance(sid string, instance *registry.MicroServiceInstance) (string, error)

RegisterServiceInstance register service center instance

func (*RegistratorMock) UnRegisterMicroServiceInstance

func (m *RegistratorMock) UnRegisterMicroServiceInstance(microServiceID, microServiceInstanceID string) error

UnRegisterMicroServiceInstance unregistered micro-service instance

func (*RegistratorMock) UpdateMicroServiceInstanceProperties

func (m *RegistratorMock) UpdateMicroServiceInstanceProperties(microServiceID, microServiceInstanceID string, properties map[string]string) error

UpdateMicroServiceInstanceProperties update micro-service instance properties

func (*RegistratorMock) UpdateMicroServiceInstanceStatus

func (m *RegistratorMock) UpdateMicroServiceInstanceStatus(microServiceID, microServiceInstanceID, status string) error

UpdateMicroServiceInstanceStatus update micro-service instance status

func (*RegistratorMock) UpdateMicroServiceProperties

func (m *RegistratorMock) UpdateMicroServiceProperties(microServiceID string, properties map[string]string) error

UpdateMicroServiceProperties update micro-service properties

Jump to

Keyboard shortcuts

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