trireme-lib: go.aporeto.io/trireme-lib/controller/pkg/remoteenforcer/internal/tokenissuer Index | Files | Directories

package tokenissuer

import "go.aporeto.io/trireme-lib/controller/pkg/remoteenforcer/internal/tokenissuer"

Index

Package Files

tokenissuer.go

type Client Uses

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

Client represents the remote API client.

func NewClient Uses

func NewClient() (*Client, error)

NewClient returns a remote API client that can be used for issuing API calls to the master enforcer.

func (*Client) Issue Uses

func (c *Client) Issue(ctx context.Context, contextID string, stype common.ServiceTokenType, audience string, validity time.Duration) (string, error)

Issue implements the ServiceTokenIssuer interface.

func (*Client) RetrieveToken Uses

func (c *Client) RetrieveToken(contextID string, stype common.ServiceTokenType, audience string, validity time.Duration) (string, error)

RetrieveToken will issue a token request to the main over the RPC channnel.

func (*Client) Run Uses

func (c *Client) Run(ctx context.Context) error

Run will initialize the client.

type TokenClient Uses

type TokenClient interface {
    Run(ctx context.Context) error
    Issue(ctx context.Context, contextID string, stype common.ServiceTokenType, audience string, validity time.Duration) (string, error)
}

TokenClient interface provides a start function. the client is used to request tokens.

Directories

PathSynopsis
mocktokenclientPackage mocktokenclient is a generated GoMock package.

Package tokenissuer imports 10 packages (graph) and is imported by 2 packages. Updated 2019-08-23. Refresh now. Tools for package owners.