MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / Server

Struct Server

libs/pubsub/pubsub.go:90–100  ·  view source on GitHub ↗

Server allows clients to subscribe/unsubscribe for messages, publishing messages with or without events, and manages internal state.

Source from the content-addressed store, hash-verified

88// Server allows clients to subscribe/unsubscribe for messages, publishing
89// messages with or without events, and manages internal state.
90type Server struct {
91 service.BaseService
92
93 cmds chan cmd
94 cmdsCap int
95
96 // check if we have subscription before
97 // subscribing or unsubscribing
98 mtx tmsync.RWMutex
99 subscriptions map[string]map[string]struct{} // subscriber -> query (string) -> empty struct
100}
101
102// Option sets a parameter for the server.
103type Option func(*Server)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected