mock

package
v0.0.0-...-c349b99 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2017 License: Apache-2.0 Imports: 2 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
	AgentCredential    []byte
	AgentCredentialErr 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() ([]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