mock

package
v0.0.0-...-4b07ea2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2017 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 FakeClient

type FakeClient struct {
	DialOption     []grpc.DialOption
	DialOptionErr  string
	Identity       string
	IdentityErr    string
	ProperPlatform bool
}

FakeClient is mocked platform metadata client.

func (FakeClient) GetAgentCredential

func (f FakeClient) GetAgentCredential() ([]byte, error)

GetAgentCredential returns empty credential.

func (FakeClient) GetCredentialType

func (f FakeClient) GetCredentialType() string

GetCredentialType returns "fake".

func (FakeClient) GetDialOptions

func (f FakeClient) GetDialOptions(*platform.ClientConfig) ([]grpc.DialOption, error)

GetDialOptions returns the DialOption field.

func (FakeClient) GetServiceIdentity

func (f FakeClient) GetServiceIdentity() (string, error)

GetServiceIdentity returns IdentityErr, or the Identity if IdentityErr is nil.

func (FakeClient) IsProperPlatform

func (f FakeClient) IsProperPlatform() bool

IsProperPlatform returns ProperPlatform.

Jump to

Keyboard shortcuts

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