Documentation ¶
Index ¶
- Constants
- Variables
- func DeregisterAllFilters(model string) (ok bool)
- func DeregisterGraph(model string) bool
- func New(opt Options) api.SyncServer
- func RegisterFilters(model string, filters ...graph.Filter)
- func RegisterGraph(model string, graph graph.Graph) bool
- func ServerStreamWithContext(ss grpc.ServerStream, ctx context.Context) grpc.ServerStream
- type Filters
- type GraphResolver
- type Options
- type PeerValidator
- type PreSharedKey
Constants ¶
View Source
const (
PSK_METADATA_KEY = "x-syncd-presharedkey"
)
Variables ¶
View Source
var (
DefaultOptions = Options{}
)
Functions ¶
func DeregisterAllFilters ¶
func DeregisterGraph ¶
func New ¶
func New(opt Options) api.SyncServer
func RegisterFilters ¶
func ServerStreamWithContext ¶
func ServerStreamWithContext(ss grpc.ServerStream, ctx context.Context) grpc.ServerStream
Types ¶
type Options ¶
type Options struct { GraphResolver GraphResolver Filters Filters PeerValidator PeerValidator Metrics prometheus.Registerer }
type PeerValidator ¶
type PreSharedKey ¶
type PreSharedKey string
func (PreSharedKey) StreamInterceptor ¶
func (psk PreSharedKey) StreamInterceptor(srv any, ss grpc.ServerStream, _ *grpc.StreamServerInfo, handler grpc.StreamHandler) error
func (PreSharedKey) UnaryInterceptor ¶
func (psk PreSharedKey) UnaryInterceptor(ctx context.Context, req any, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp any, err error)
Click to show internal directories.
Click to hide internal directories.