@@ -118,9 +118,11 @@ Events
118118
119119Hooks
120120#####
121- ============================================================ =============================================
121+ ============================================================ =============================================================
122122:zeek:id: `Cluster::log_policy `: :zeek:type: `Log::PolicyHook ` A default logging policy hook for the stream.
123- ============================================================ =============================================
123+ :zeek:id: `Cluster::on_subscribe `: :zeek:type: `hook ` A hook invoked for every :zeek:see: `Cluster::subscribe ` call.
124+ :zeek:id: `Cluster::on_unsubscribe `: :zeek:type: `hook ` A hook invoked for every :zeek:see: `Cluster::subscribe ` call.
125+ ============================================================ =============================================================
124126
125127Functions
126128#########
@@ -750,7 +752,7 @@ Types
750752 Events
751753######
752754.. zeek :id :: Cluster::hello
753- :source-code: base/frameworks/cluster/main.zeek 498 523
755+ :source-code: base/frameworks/cluster/main.zeek 512 537
754756
755757 :Type: :zeek:type: `event ` (name: :zeek:type: `string `, id: :zeek:type: `string `)
756758
@@ -784,10 +786,34 @@ Hooks
784786
785787 A default logging policy hook for the stream.
786788
789+ .. zeek :id :: Cluster::on_subscribe
790+ :source-code: base/frameworks/cluster/main.zeek 410 410
791+
792+ :Type: :zeek:type: `hook ` (topic: :zeek:type: `string `) : :zeek:type: `bool `
793+
794+ A hook invoked for every :zeek:see: `Cluster::subscribe ` call.
795+
796+ Breaking from this hook has no effect.
797+
798+
799+ :param topic: The topic string as given to :zeek:see: `Cluster::subscribe `.
800+
801+ .. zeek :id :: Cluster::on_unsubscribe
802+ :source-code: base/frameworks/cluster/main.zeek 417 417
803+
804+ :Type: :zeek:type: `hook ` (topic: :zeek:type: `string `) : :zeek:type: `bool `
805+
806+ A hook invoked for every :zeek:see: `Cluster::subscribe ` call.
807+
808+ Breaking from this hook has no effect.
809+
810+
811+ :param topic: The topic string as given to :zeek:see: `Cluster::subscribe `.
812+
787813Functions
788814#########
789815.. zeek :id :: Cluster::create_store
790- :source-code: base/frameworks/cluster/main.zeek 578 653
816+ :source-code: base/frameworks/cluster/main.zeek 592 667
791817
792818 :Type: :zeek:type: `function ` (name: :zeek:type: `string `, persistent: :zeek:type: `bool ` :zeek:attr: `&default ` = ``F `` :zeek:attr: `&optional `) : :zeek:type: `Cluster::StoreInfo `
793819
@@ -806,7 +832,7 @@ Functions
806832 be set until the node containing the master store has connected.
807833
808834.. zeek :id :: Cluster::get_active_node_count
809- :source-code: base/frameworks/cluster/main.zeek 442 445
835+ :source-code: base/frameworks/cluster/main.zeek 456 459
810836
811837 :Type: :zeek:type: `function ` (node_type: :zeek:type: `Cluster::NodeType `) : :zeek:type: `count `
812838
@@ -815,15 +841,15 @@ Functions
815841 out how many nodes should be responding to requests.
816842
817843.. zeek :id :: Cluster::get_node_count
818- :source-code: base/frameworks/cluster/main.zeek 429 440
844+ :source-code: base/frameworks/cluster/main.zeek 443 454
819845
820846 :Type: :zeek:type: `function ` (node_type: :zeek:type: `Cluster::NodeType `) : :zeek:type: `count `
821847
822848 Returns the number of nodes defined in the cluster layout for a given
823849 node type.
824850
825851.. zeek :id :: Cluster::init
826- :source-code: base/frameworks/cluster/main.zeek 660 663
852+ :source-code: base/frameworks/cluster/main.zeek 674 677
827853
828854 :Type: :zeek:type: `function ` () : :zeek:type: `bool `
829855
@@ -835,7 +861,7 @@ Functions
835861 :returns: T on success, else F.
836862
837863.. zeek :id :: Cluster::is_enabled
838- :source-code: base/frameworks/cluster/main.zeek 447 450
864+ :source-code: base/frameworks/cluster/main.zeek 461 464
839865
840866 :Type: :zeek:type: `function ` () : :zeek:type: `bool `
841867
@@ -846,7 +872,7 @@ Functions
846872 :returns: True if :zeek:id: `Cluster::node ` has been set.
847873
848874.. zeek :id :: Cluster::listen_websocket
849- :source-code: base/frameworks/cluster/main.zeek 675 678
875+ :source-code: base/frameworks/cluster/main.zeek 689 692
850876
851877 :Type: :zeek:type: `function ` (options: :zeek:type: `Cluster::WebSocketServerOptions `) : :zeek:type: `bool `
852878
@@ -859,7 +885,7 @@ Functions
859885 :returns: T on success, else F.
860886
861887.. zeek :id :: Cluster::local_node_metrics_port
862- :source-code: base/frameworks/cluster/main.zeek 463 475
888+ :source-code: base/frameworks/cluster/main.zeek 477 489
863889
864890 :Type: :zeek:type: `function ` () : :zeek:type: `port `
865891
@@ -872,7 +898,7 @@ Functions
872898 :returns: The metrics port used by the calling node.
873899
874900.. zeek :id :: Cluster::local_node_type
875- :source-code: base/frameworks/cluster/main.zeek 452 461
901+ :source-code: base/frameworks/cluster/main.zeek 466 475
876902
877903 :Type: :zeek:type: `function ` () : :zeek:type: `Cluster::NodeType `
878904
@@ -885,7 +911,7 @@ Functions
885911 :returns: The :zeek:type: `Cluster::NodeType ` the calling node acts as.
886912
887913.. zeek :id :: Cluster::log
888- :source-code: base/frameworks/cluster/main.zeek 655 658
914+ :source-code: base/frameworks/cluster/main.zeek 669 672
889915
890916 :Type: :zeek:type: `function ` (msg: :zeek:type: `string `) : :zeek:type: `void `
891917
@@ -919,7 +945,7 @@ Functions
919945 a given cluster node.
920946
921947.. zeek :id :: Cluster::nodeid_to_node
922- :source-code: base/frameworks/cluster/main.zeek 487 496
948+ :source-code: base/frameworks/cluster/main.zeek 501 510
923949
924950 :Type: :zeek:type: `function ` (id: :zeek:type: `string `) : :zeek:type: `Cluster::NamedNode `
925951
@@ -950,7 +976,7 @@ Functions
950976 a given cluster node.
951977
952978.. zeek :id :: Cluster::subscribe
953- :source-code: base/frameworks/cluster/main.zeek 665 668
979+ :source-code: base/frameworks/cluster/main.zeek 679 682
954980
955981 :Type: :zeek:type: `function ` (topic: :zeek:type: `string `) : :zeek:type: `bool `
956982
@@ -963,7 +989,7 @@ Functions
963989 :returns: T on success, else F.
964990
965991.. zeek :id :: Cluster::unsubscribe
966- :source-code: base/frameworks/cluster/main.zeek 670 673
992+ :source-code: base/frameworks/cluster/main.zeek 684 687
967993
968994 :Type: :zeek:type: `function ` (topic: :zeek:type: `string `) : :zeek:type: `bool `
969995
0 commit comments