serverdiscovery

package
v1.15.3 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACLResolver

type ACLResolver interface {
	ResolveTokenAndDefaultMeta(string, *acl.EnterpriseMeta, *acl.AuthorizerContext) (resolver.Result, error)
}

type Config

type Config struct {
	Publisher   EventPublisher
	Logger      hclog.Logger
	ACLResolver ACLResolver
}

type EventPublisher

type EventPublisher interface {
	Subscribe(*stream.SubscribeRequest) (*stream.Subscription, error)
}

type MockACLResolver

type MockACLResolver struct {
	mock.Mock
}

MockACLResolver is an autogenerated mock type for the ACLResolver type

func NewMockACLResolver

func NewMockACLResolver(t mockConstructorTestingTNewMockACLResolver) *MockACLResolver

NewMockACLResolver creates a new instance of MockACLResolver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockACLResolver) ResolveTokenAndDefaultMeta

func (_m *MockACLResolver) ResolveTokenAndDefaultMeta(_a0 string, _a1 *acl.EnterpriseMeta, _a2 *acl.AuthorizerContext) (resolver.Result, error)

ResolveTokenAndDefaultMeta provides a mock function with given fields: _a0, _a1, _a2

type Server

type Server struct {
	Config
}

func NewServer

func NewServer(cfg Config) *Server

func (*Server) Register

func (s *Server) Register(grpcServer *grpc.Server)

func (*Server) WatchServers

WatchServers provides a stream on which you can receive the list of servers that are ready to receive incoming requests including stale queries. The current set of ready servers are sent immediately at the start of the stream and new updates will be sent whenver the set of ready servers changes.

Jump to

Keyboard shortcuts

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