internal

package
v1.1.0-beta3 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const StrategyForm = SettingsStrategy("Form")
View Source
const StrategyStringWithPassword = SettingsStrategy("Connection String")

Variables

This section is empty.

Functions

func NewServer

func NewServer(logger hclog.Logger) pub.PublisherServer

NewServer creates a new publisher Host.

Types

type Server

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

func (*Server) Connect

func (s *Server) Connect(ctx context.Context, req *pub.ConnectRequest) (*pub.ConnectResponse, error)

func (*Server) Disconnect

func (*Server) DiscoverShapes

func (*Server) PublishStream

func (s *Server) PublishStream(req *pub.PublishRequest, stream pub.Publisher_PublishStreamServer) error

type Settings

type Settings struct {
	Strategy           SettingsStrategy            `json:"strategy"`
	Form               *SettingsForm               `json:"form"`
	StringWithPassword *SettingsStringWithPassword `json:"stringWithPassword"`
}

func (*Settings) GetConnectionString

func (s *Settings) GetConnectionString() (string, error)

func (*Settings) Validate

func (s *Settings) Validate() error

Validate returns an error if the Settings are not valid. It also populates the internal fields of settings.

type SettingsForm

type SettingsForm struct {
	Hostname    string `json:"hostname"`
	Port        int    `json:"port"`
	ServiceName string `json:"serviceName"`
	Username    string `json:"username"`
	Password    string `json:"password"`
}

type SettingsStrategy

type SettingsStrategy string

type SettingsStringWithPassword

type SettingsStringWithPassword struct {
	ConnectionString string `json:"connectionString"`
	Password         string `json:"password"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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