fabric-sdk-go: github.com/hyperledger/fabric-sdk-go/pkg/context Index | Files

package context

import "github.com/hyperledger/fabric-sdk-go/pkg/context"


Package Files



var ReqContextTimeoutOverrides = reqContextKey("timeout-overrides")

ReqContextTimeoutOverrides key for grpc context value of timeout overrides

func NewRequest Uses

func NewRequest(client context.Client, options ...ReqContextOptions) (reqContext.Context, reqContext.CancelFunc)

NewRequest creates a request-scoped context.

func RequestClientContext Uses

func RequestClientContext(ctx reqContext.Context) (context.Client, bool)

RequestClientContext extracts the Client Context from the request-scoped context.

func RequestCommManager Uses

func RequestCommManager(ctx reqContext.Context) (fab.CommManager, bool)

RequestCommManager extracts the CommManager from the request-scoped context.

type Channel Uses

type Channel struct {
    // contains filtered or unexported fields

Channel supplies the configuration for channel context client

func NewChannel Uses

func NewChannel(clientProvider context.ClientProvider, channelID string) (*Channel, error)

NewChannel creates new channel context client Not be used by end developers, fabsdk package use only

func (*Channel) ChannelID Uses

func (c *Channel) ChannelID() string

ChannelID returns channel id

func (*Channel) ChannelService Uses

func (c *Channel) ChannelService() fab.ChannelService

ChannelService returns channel service

func (*Channel) Providers Uses

func (c *Channel) Providers() context.Client

Providers returns core providers

type Client Uses

type Client struct {

Client supplies the configuration and signing identity to client objects.

type Local Uses

type Local struct {
    // contains filtered or unexported fields

Local supplies the configuration and signing identity to clients that will be invoking the peer outside of a channel context using an identity in the peer's local MSP.

func NewLocal Uses

func NewLocal(clientProvider context.ClientProvider) (*Local, error)

NewLocal returns a new local context

func (*Local) LocalDiscoveryService Uses

func (c *Local) LocalDiscoveryService() fab.DiscoveryService

LocalDiscoveryService returns core discovery service

type Provider Uses

type Provider struct {
    // contains filtered or unexported fields

Provider implementation of Providers interface

func NewProvider Uses

func NewProvider(params ...SDKContextParams) *Provider

NewProvider creates new context client provider Not be used by end developers, fabsdk package use only

func (*Provider) ChannelProvider Uses

func (c *Provider) ChannelProvider() fab.ChannelProvider

ChannelProvider provides channel services.

func (*Provider) CryptoSuite Uses

func (c *Provider) CryptoSuite() core.CryptoSuite

CryptoSuite returns the BCCSP provider of sdk.

func (*Provider) EndpointConfig Uses

func (c *Provider) EndpointConfig() fab.EndpointConfig

EndpointConfig returns end point network config

func (*Provider) GetMetrics Uses

func (c *Provider) GetMetrics() *metrics.ClientMetrics

GetMetrics will return the SDK's metrics instance

func (*Provider) IdentityConfig Uses

func (c *Provider) IdentityConfig() msp.IdentityConfig

IdentityConfig returns the Identity config

func (*Provider) IdentityManager Uses

func (c *Provider) IdentityManager(orgName string) (msp.IdentityManager, bool)

IdentityManager returns identity manager for organization

func (*Provider) InfraProvider Uses

func (c *Provider) InfraProvider() fab.InfraProvider

InfraProvider provides fabric objects such as peer and user

func (*Provider) LocalDiscoveryProvider Uses

func (c *Provider) LocalDiscoveryProvider() fab.LocalDiscoveryProvider

LocalDiscoveryProvider returns the local discovery provider

func (*Provider) SigningManager Uses

func (c *Provider) SigningManager() core.SigningManager

SigningManager returns signing manager

func (*Provider) UserStore Uses

func (c *Provider) UserStore() msp.UserStore

UserStore returns state store

type ReqContextOptions Uses

type ReqContextOptions func(opts *requestContextOpts)

ReqContextOptions parameter for creating requestContext

func WithParent Uses

func WithParent(context reqContext.Context) ReqContextOptions

WithParent sets existing reqContext as a parent ReqContext

func WithTimeout Uses

func WithTimeout(timeout time.Duration) ReqContextOptions

WithTimeout sets timeout time duration to request context

func WithTimeoutType Uses

func WithTimeoutType(timeoutType fab.TimeoutType) ReqContextOptions

WithTimeoutType sets timeout by type defined in config to request context

type SDKContextParams Uses

type SDKContextParams func(opts *Provider)

SDKContextParams parameter for creating FabContext

func WithChannelProvider Uses

func WithChannelProvider(channelProvider fab.ChannelProvider) SDKContextParams

WithChannelProvider sets channelProvider to Context Provider

func WithClientMetrics Uses

func WithClientMetrics(cm *metrics.ClientMetrics) SDKContextParams

WithClientMetrics sets clientMetrics to Context Provider

func WithCryptoSuite Uses

func WithCryptoSuite(cryptoSuite core.CryptoSuite) SDKContextParams

WithCryptoSuite sets cryptosuite parameter to Context Provider

func WithCryptoSuiteConfig Uses

func WithCryptoSuiteConfig(cryptoSuiteConfig core.CryptoSuiteConfig) SDKContextParams

WithCryptoSuiteConfig sets core cryptoSuite config to Context Provider

func WithEndpointConfig Uses

func WithEndpointConfig(endpointConfig fab.EndpointConfig) SDKContextParams

WithEndpointConfig sets fab endpoint network config to Context Provider

func WithIdentityConfig Uses

func WithIdentityConfig(identityConfig msp.IdentityConfig) SDKContextParams

WithIdentityConfig sets msp identity config to Context Provider

func WithIdentityManagerProvider Uses

func WithIdentityManagerProvider(provider msp.IdentityManagerProvider) SDKContextParams

WithIdentityManagerProvider sets IdentityManagerProvider maps to context

func WithInfraProvider Uses

func WithInfraProvider(infraProvider fab.InfraProvider) SDKContextParams

WithInfraProvider sets infraProvider maps to Context Provider

func WithLocalDiscoveryProvider Uses

func WithLocalDiscoveryProvider(discoveryProvider fab.LocalDiscoveryProvider) SDKContextParams

WithLocalDiscoveryProvider sets the local discovery provider

func WithSigningManager Uses

func WithSigningManager(signingManager core.SigningManager) SDKContextParams

WithSigningManager sets signingManager to Context Provider

func WithUserStore Uses

func WithUserStore(userStore msp.UserStore) SDKContextParams

WithUserStore sets user store to Context Provider

Package context imports 8 packages (graph) and is imported by 16 packages. Updated 2019-02-09. Refresh now. Tools for package owners.