server

package
v0.0.0-...-891c386 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorInvalidRequest       = errors.New("invalid request")
	ErrorInvalidOpenReq       = errors.New("invalid open request")
	ErrorInvalidFeedURI       = errors.New("invalid feed URI")
	ErrorInvalidEntryBody     = errors.New("invalid entry body")
	ErrorInvalidUnsupportedOp = errors.New("unsupported operation")
)

Functions

func Run

func Run(ctx context.Context, db *store.Store, cfg *Config)

Types

type Config

type Config struct {
	Addr        string
	Port        int
	Insecure    bool
	TLSCertPath string
	TLSKeyPath  string
	Log         *log.Entry
}

func DevConfig

func DevConfig() *Config

func (*Config) Init

func (cfg *Config) Init()

Init overrides the configuration values of the Config object with those passed in as flags

type Connection

type Connection struct {
	pb.VaultGrpc_VaultSessionServer
	// contains filtered or unexported fields
}

Connection is a thin wrapper around the gRPC session, with a unique ID per connection so that we can keep track of connections

type Stream

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

Stream is a thin wrapper around Connection with a unique client-determined ID, so that clients can reference the stream later

func (*Stream) Done

func (s *Stream) Done()

Done removes the stream from the Connection

func (*Stream) ID

func (s *Stream) ID() helpers.UUID

ID returns the connection ID because the store enforces a per-connection unique constraint on streams. Opening a new stream on the same channel closes the old stream.

func (*Stream) Publish

func (s *Stream) Publish(msg *pb.Msg)

Publish sends the message thru the stream's connection to the client

type VaultServer

type VaultServer struct {
	pb.UnimplementedVaultGrpcServer
	// contains filtered or unexported fields
}

func (*VaultServer) VaultSession

func (v *VaultServer) VaultSession(session pb.VaultGrpc_VaultSessionServer) error

Jump to

Keyboard shortcuts

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